https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102721
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-10-12 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, Here is a better example of what is going wrong: template<class T> struct A { void foo(const T){} }; using t = decltype(+[]{})[3]; using t1 = const decltype(+[]{})[3]; template<> void A<t>::foo(t1) {} template<> void A<decltype(+[]{})[4]>::foo(const decltype(+[]{})[4]) {} The first template specialization is accepted but the second one is not.