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
The splice-type-specifier designates the same entity as the splice-specifier.
For a splice-type-specifier of the form typename
The splice-type-specifier designates the specialization of T corresponding to the template argument list of the splice-specialization-specifier.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant