3 ms·
Good catch. Its weird that it compiles without error as a consteval func.
by lbhdc 1y ago
Good catch. Its weird that it compiles without error as a consteval func.
- TuxSH 1y agoHmm, looking at cppreference: The consteval specifier declares a function or function template to be an immediate function, that is, every potentially-evaluated call to the function must (directly or indirectly) produce a compile time constant expression. It's possible that the compiler just doesn't bother as long as you aren't actually calling the function.