You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constexprintfoo(int s)
{
if (std::is_constant_evaluated()) // note: not "if constexpr"/* evaluated at compile time */;
else/* evaluated at run time */;
}
The text was updated successfully, but these errors were encountered:
We expect that most of the keys are known at compile-time, which you can leverage to validate them.
According to stack overflow, see https://stackoverflow.com/questions/46919582/is-it-possible-to-test-if-a-constexpr-function-is-evaluated-at-compile-time, C++20 solves the problem:
The text was updated successfully, but these errors were encountered: