Post

C++ Quiz time (URGENT) compiler-explorer.com/z/hd46cxoPE without looking at execution output (after de-maximalizing the source window, you can see them) what it should print? before = ?, ?, ? after = ?, ?, ? (constexpr) after = ?, ?, ? (consteval) after = ?, ?, ? (escalate)

compiler-explorer.comCompiler Explorer - C++ (x86-64 gcc 16.1)consteval int escalate_me() { return 0; } constexpr int foo() { if consteval { #ifdef __clang__ return __constexpr_uncaught_exceptions(); #else return __builtin_u...

0 reposts2 likes

My guess: before = 0, 0, 0 after = 1, 1, 0 (constexpr) after = 0, 0, 0 (consteval) after = 1, 1, 0 (escalate) I could be convinced that the second "constexpr" result is 0, though - but I think this one won't automatically escalate to compile time (as the latter does) really not sure on the last