https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92707
Frank Heckenbach <f.heckenb...@fh-soft.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |f.heckenb...@fh-soft.de --- Comment #1 from Frank Heckenbach <f.heckenb...@fh-soft.de> --- Probably the same bug in a slightly different form: % cat test.cpp template <typename> struct S { }; template <int> using A = S <decltype ([] { })>; template <int d> using B = A <d>; B <0> a; % g++ -std=c++20 -Wall -Wextra test.cpp test.cpp:4:1: error: 'B' does not name a type 4 | B <0> a; | ^ It works when using A instead of B. It works when using an alias for "decltype ([] { })". Other compilers accept it as is. Also, I find the message confusing (even if it was rightly rejected): Of course, 'B' does not name a type. It's followed by template arguments, so 'B' shouldn't be a type, but a template or template alias, or 'B <0>' should be a type.