If the type T of a template-parameter ([temp.param])
contains a placeholder type ([dcl.spec.auto])
or a placeholder for a deduced class type ([dcl.type.class.deduct]),
the type of the parameter is the type deduced
for the variable x in the invented declaration
T x =template-argument ;
If a deduced parameter type is not permitted
for a template-parameter declaration ([temp.param]),
the program is ill-formed.
If the template-argument
is an overload set
(or the address of such, including forming a pointer-to-member),
the matching function is selected from the set ([over.over]).
For a non-type template-parameter of reference or pointer type,
or for each non-static data member of reference or pointer type
in a non-type template-parameter of class type or subobject thereof,
the reference or pointer value shall not refer to
or be the address of (respectively):
[Example 1: template<constint* pci>struct X {/* ... */};
int ai[10];
X<ai> xi; // array to pointer and qualification conversionsstruct Y {/* ... */};
template<const Y& b>struct Z {/* ... */};
Y y;
Z<y> z; // no conversion, but note extra cv-qualificationtemplate<int(&pa)[5]>struct W {/* ... */};
int b[5];
W<b> w; // no conversionvoid f(char);
void f(int);
template<void(*pf)(int)>struct A {/* ... */};
A<&f> a; // selects f(int)template<auto n>struct B {/* ... */};
B<5> b1; // OK, template parameter type is int
B<'a'> b2; // OK, template parameter type is char
B<2.5> b3; // OK, template parameter type is double
B<void(0)> b4; // error: template parameter type cannot be void — end example]
[Example 3: template<constint& CRI>struct B {/* ... */};
B<1> b1; // error: temporary would be required for template argumentint c =1;
B<c> b2; // OKstruct X {int n; };
struct Y {constint&r; };
template<Y y>struct C {/* ... */};
C<Y{X{1}.n}> c; // error: subobject of temporary object used to initialize// reference member of template parameter — end example]