https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102899
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Just compile your testcase with additional -Dconstexpr= -Dconsteval= -D'static_assert(x)=' to see how it is compiled, there is that infinite recursion with all compilers I've tried.