https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89898
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >In the following, the invalid function template definition is accepted in >c++2a mode: How is this invalid C++20 code? C++20 allows class non-type template arguments. X<A{}> is a valid type now in C++20. This is defining a template function whos template argument is of type X<A{}> E.g this is also valid: template<X<A{}> a> void f () { } I Know it looks confusing but I don't see anything wrong with this code.