Re:Proposal to add constexpr to C [pdf]
by boulos on Saturday October 16, 2021 @09:47PM
(#28893275)
Hmm, is that just because of the template resolution? (and so wouldn't apply to constexpr in C)
AFAICT, something about the template declarations is making the call of f(x) to be "who could know" (which should just be fail).
The same thing with concrete types says that f isn't constexpr [3]. And you have to make it actually constexpr by removing the static from counter [4].
AFAICT, something about the template declarations is making the call of f(x) to be "who could know" (which should just be fail).
The same thing with concrete types says that f isn't constexpr [3]. And you have to make it actually constexpr by removing the static from counter [4].
[1] https://docs.microsoft.com/en-us/cpp/cpp/constexpr-cpp?view=...
[2] https://godbolt.org/z/7rGWbP1xz
[3] https://godbolt.org/z/5WjMr3Kjv
[4] https://godbolt.org/z/v9rc1j9zc