9 Declarations [dcl]

9.2 Specifiers [dcl.spec]

9.2.9 Type specifiers [dcl.type]

9.2.9.9 Type splicing [dcl.type.splice]

A splice-specifier or splice-specialization-specifier immediately followed by ​::​ is never interpreted as part of a splice-type-specifier.
A splice-specifier or splice-specialization-specifier not preceded by typename is only interpreted as a splice-type-specifier within a type-only context ([temp.res.general]).
[Example 1: template<std::meta::info R> void tfn() { typename [:R:]::type m; // OK, typename applies to the qualified name } struct S { using type = int; }; void fn() { [:^^S::type:] *var; // error: [:^^S​::​type:] is an expression typename [:^^S::type:] *var; // OK, declares variable with type int* } using alias = [:^^S::type:]; // OK, type-only context — end example]
For a splice-type-specifier of the form typename splice-specifier, the splice-specifier shall designate a type, a class template, or an alias template.
The splice-type-specifier designates the same entity as the splice-specifier.
For a splice-type-specifier of the form typename splice-specialization-specifier, the splice-specifier of the splice-specialization-specifier shall designate a template T that is either a class template or an alias template.
The splice-type-specifier designates the specialization of T corresponding to the template argument list of the splice-specialization-specifier.