Re:Proposal to add constexpr to C [pdf]
by jcelerier on Saturday October 16, 2021 @04:01PM
(#28890963)
ah yes, that'll teach me to type on my phone :)
what do you think that I think that constexpr does ? constexpr in a variable forces the variable's value to be evaluated in a constant expression context (which comes with footgunes, see an in-depth coverage of the issue there: https://gist.github.com/Som1Lse/5309b114accc086d24b842fd803b...)
For example, "if constexpr(is_constant_evaluated())" is always true, I think.
See also the new C++ keyword "consteval" (yes, really!)