2 ms·
"constexpr" does not do what you think it does. For example, "if constexpr(is_constant_evaluated())" is always true, I think. See also the new C++ keyword "co
by petters 5y ago
"constexpr" does not do what you think it does.
For example, "if constexpr(is_constant_evaluated())" is always true, I think.
See also the new C++ keyword "consteval" (yes, really!)
- jcelerier 5y agoah 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/5309b114accc086d24b842fd803ba9d2 https://gist.github.com/Som1Lse/5309b114accc086d24b842fd803b...)