https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110348
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #10) > Jason, do we have a way to test whether something is a core constant > expression in the FE? Seems the https://eel.is/c++draft/expr.const#13 > checks are done in cxx_eval_outermost_constant_expression and I don't see a > way to ignore them. > > Because for N > 0, I think we can as well check it just by evaluating > T{}.data ()[0] > etc., but for N == 0 we can't. Maybe that is what Jonathan was suggesting, see if (T{}.data (), 0) is a constant expression.