[basic.splice] (original) (raw)

6 Basics [basic]

6.6 Splice specifiers [basic.splice]

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-listwhen 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:])>;static_assert(alias::s == 2);auto o1 = [:^^TCls:]<([:^^v:])>(); auto o2 = typename [:^^TCls:]<([:^^v:])>(); consteval int bad_splice(std::meta::info v) { return [:v:]; } — _end example_]

— _end note_]