considering following snippet of code: template<typename T, template<typename...>typename Template> struct Specialization{}; template<template<typename...>typename Template, typename...Args> struct Specialization<Template<Args...>, Template>{ using type=Template; }; Using -std=c++20 gives meaningless error message of "'auto' not allowed in alias declaration". While -std=c++17 or before all give correct error message: "missing template arguments after 'Template<...auto...>'". And -std=c++14 is even better with "invalid use of template-name 'Template' without an argument list". See https://godbolt.org/z/Wb9nKzcPT
Confirmed reduced to just: template<typename> class Tt; using type=Tt;
I've just hit this myself and was quite confused by the diagnostic. A realistic but still close to minimal reproducer is: namespace x { template<class T> struct S { }; } struct A { using S = ::x::S; }; Unsurprisingly, you get the same error with -std=c++17 -fconcepts, because the compiler seems to be treating the template-id as a placeholder-type-specifier, maybe even as a type-constraint. Neither makes sense as the defining-type-id of an alias-declaration. With -std=c++14 you get a correct "invalid use of template-name" error, but then an incorrect note about CTAD: using.cc:8:13: error: invalid use of template-name 'x::S' without an argument list 8 | using S = ::x::S; | ^~ using.cc:8:13: note: class template argument deduction is only available with '-std=c++17' or '-std=gnu++17' using.cc:3:28: note: 'template<class T> struct x::S' declared here 3 | template<class T> struct S { }; | ^ Although it's true that CTAD isn't available in C++14, it's not relevant here because it couldn't be used here anyway (as evidenced by the fact it still doesn't compie in C++17). I would expect the same error for C++14 and C++17 (and ideally C++20 too) since the code is invalid in exactly the same way in all cases. C++17 gives a similar error to C++14 but with slightly different wording for some reason: using.cc:8:13: error: missing template arguments after 'x::S' 8 | using S = ::x::S; | ^~ | <> using.cc:3:28: note: 'template<class T> struct x::S' declared here 3 | template<class T> struct S { }; | ^ So we should: 1) fix the bogus "auto not allowed" when concepts are enabled; 2) harmonize the C++14 and C++17 wording about missing template args; 3) remove the bogus note about CTAD.
*** Bug 101221 has been marked as a duplicate of this bug. ***
A slight variation from PR 101221: template<class T> struct S; template<class T> using SS = S; For comparison, Clang and EDG give exactly the same diagnostic for all examples above irrespective of C++14/17/20 mode.