2 ms·
It doesn't even guarantee compile-time evaluation; it only guarantees that it can be evaluated at compile time. There is no guarantee for the compiler to actual
by Jasper_ 7y ago
It doesn't even guarantee compile-time evaluation; it only guarantees that it can be evaluated at compile time. There is no guarantee for the compiler to actually do so --and some compilers will barf on complex constexpr. Future editions of C++ add consteval to ensure that it is evaluated at compile time.