None of the above, a constexpr function only may be used in constant-evaluated contexts. In fact, if I’m not mistaken, constexpr functions can be defined which cannot ever actually be constant-evaluated. That’s why consteval is important.
3 months ago | 3
YIL (Yesterday I Learned) if you make a function constexpr, you have to move the definition to the header file. I also learned that you have to put as many definitions out of the header file as possible to decrease compile time. Since constexpr is most useful for static utility functions, and utility functions are at their best if they're used everywhere, I'm at a dilemma.
3 months ago (edited) | 0
Bisqwit
In C++, the “constexpr” keyword is used to denote…
3 months ago | [YT] | 34