[basic.splice]

# 6 Basics [[basic]](./#basic)

## 6.6 Splice specifiers [basic.splice]

[splice-specifier:](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]")  
[: [*constant-expression*](expr.const#nt:constant-expression "7.7 Constant expressions [expr.const]") :]

[splice-specialization-specifier:](#nt:splice-specialization-specifier "6.6 Splice specifiers [basic.splice]")  
[*splice-specifier*](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]") < [*template-argument-list*](temp.names#nt:template-argument-list "13.3 Names of template specializations [temp.names]")opt >

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L2822)

The [*constant-expression*](expr.const#nt:constant-expression "7.7 Constant expressions [expr.const]") of a [*splice-specifier*](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]") shall be a converted constant expression of
type std​::​meta​::​info ([[expr.const]](expr.const "7.7 Constant expressions"))[.](#1.sentence-1)

A [*splice-specifier*](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]") whose converted [*constant-expression*](expr.const#nt:constant-expression "7.7 Constant expressions [expr.const]") represents
a construct X is said to [*designate*](#def:designate "6.6 Splice specifiers [basic.splice]") either

- [(1.1)](#1.1)

the underlying entity of X if X is an entity ([[basic.pre]](basic.pre "6.1 Preamble")), or

- [(1.2)](#1.2)

X otherwise[.](#1.sentence-2)

[*Note [1](#note-1)*:

A [*splice-specifier*](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]") is dependent
if the converted [*constant-expression*](expr.const#nt:constant-expression "7.7 Constant expressions [expr.const]") is
value-dependent ([[temp.dep.splice]](temp.dep.splice "13.8.3.5 Dependent splice specifiers"))[.](#1.sentence-3)

â *end note*]

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L2839)

A non-dependent [*splice-specifier*](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]") of
a [*splice-specialization-specifier*](#nt:splice-specialization-specifier "6.6 Splice specifiers [basic.splice]") shall designate a template[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/basic.tex#L2843)

[*Note [2](#note-2)*:

A < following a [*splice-specifier*](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]") is interpreted as
the delimiter of a [*template-argument-list*](temp.names#nt:template-argument-list "13.3 Names of template specializations [temp.names]") when the [*splice-specifier*](#nt:splice-specifier "6.6 Splice specifiers [basic.splice]") is preceded by
the keyword template or the keyword typename, or
when it appears in a type-only context ([[temp.names]](temp.names "13.3 Names of template specializations"))[.](#3.sentence-1)

[*Example [1](#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*](#nt:splice-specialization-specifier "6.6 Splice specifiers [basic.splice]") with a parenthesized [*splice-expression*](expr.prim.splice#nt:splice-expression "7.5.9 Expression splicing [expr.prim.splice]") as a template argumentstatic_assert(alias::s == 2);

auto o1 = [:^^TCls:]<([:^^v:])>(); // error: < means less thanauto 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*]
