1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 namespace DeductionForInstantiation
{
5 template<unsigned I
, typename
...Types
>
8 template<typename
...Types
>
9 void f0(X
<sizeof...(Types
), Types
&...>) { }
11 // No explicitly-specified arguments
12 template void f0(X
<0>);
13 template void f0(X
<1, int&>);
14 template void f0(X
<2, int&, short&>);
16 // One explicitly-specified argument
17 template void f0
<float>(X
<1, float&>);
18 template void f0
<double>(X
<1, double&>);
20 // Two explicitly-specialized arguments
21 template void f0
<char, unsigned char>(X
<2, char&, unsigned char&>);
22 template void f0
<signed char, char>(X
<2, signed char&, char&>);
24 // FIXME: Extension of explicitly-specified arguments
25 // template void f0<short, int>(X<3, short&, int&, long&>);
28 namespace DeductionWithConversion
{
29 template<char...> struct char_values
{
30 static const unsigned value
= 0;
33 template<int C1
, char C3
>
34 struct char_values
<C1
, 12, C3
> {
35 static const unsigned value
= 1;
38 int check0
[char_values
<1, 12, 3>::value
== 1? 1 : -1];
40 template<int...> struct int_values
{
41 static const unsigned value
= 0;
44 template<unsigned char C1
, unsigned char C3
>
45 struct int_values
<C1
, 12, C3
> {
46 static const unsigned value
= 1;
49 int check1
[int_values
<256, 12, 3>::value
== 0? 1 : -1];
50 int check2
[int_values
<3, 12, 3>::value
== 1? 1 : -1];