https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104803
--- Comment #3 from Barry Revzin <barry.revzin at gmail dot com> --- clang is also wrong. p(i) doesn't have to be a constant expression there. The rule (http://eel.is/c++draft/expr.const#13) is "An immediate invocation shall be a constant expression." but an expression is only an immediate invocation if it's not in an immediate function context, and the first branch of if consteval is an immediate function context.