https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112594
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2023-11-20 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. This fails in a similar way so it is not related to i being static here: ``` template<typename T> concept C = true; struct n { constexpr n(int a) : i(a) {} int i; }; template<n N> using get_n_i_type = decltype(N.i); template<int X> int f() { using iii = get_n_i_type<X>; #if 1 // Change to 0 and this compiles static_assert(C<iii>); #endif return iii{}; } template int f<3>(); ``` I will file another related bug seperately which seems like a regression on the trunk.