6 Basics [basic]

6.6 Splice specifiers [basic.splice]

The constant-expression of a splice-specifier shall be a converted constant expression of type std​::​meta​::​info ([expr.const]).
A splice-specifier whose converted constant-expression represents a construct X is said to designate either
[Note 1: 
A splice-specifier is dependent if the converted constant-expression is value-dependent ([temp.dep.splice]).
— end note]
A non-dependent splice-specifier of a splice-specialization-specifier shall designate a template.
[Note 2: 
A < following a splice-specifier is interpreted as the delimiter of a template-argument-list when the splice-specifier is preceded by the keyword template or the keyword typename, or when it appears in a type-only context ([temp.names]).
[Example 1: constexpr int v = 1; template<int V> struct TCls { static constexpr int s = V + 1; }; using alias = [:^^TCls:]<([:^^v:])>; // OK, a splice-specialization-specifier with a splice-expression as a template argument static_assert(alias::s == 2); auto o1 = [:^^TCls:]<([:^^v:])>(); // error: < means less than auto o2 = typename [:^^TCls:]<([:^^v:])>(); // OK, o2 is an object of type TCls<1> consteval int bad_splice(std::meta::info v) { return [:v:]; // error: v is not constant } — end example]
— end note]