When constexpr functions are evaluated?
Show answer and explanation
A constexpr function can run at compile time when called with suitable arguments in a context requiring a constant expression, but it may also run at runtime. consteval is the tool when compile-time evaluation is mandatory.
A constexpr function can run at compile time when called with suitable arguments in a context requiring a constant expression, but it may also run at runtime. consteval is the tool when compile-time evaluation is mandatory.
Connect the conclusion directly to the type, lifetime, ownership, overload-resolution rule, or library contract present in the question. State implementation dependence or a violated precondition explicitly instead of merely guessing output.