1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
5 template <int> int f(int); // expected-note {{candidate function}}
6 #if __cplusplus <= 199711L
7 // expected-note@-2 {{candidate function}}
10 template <signed char> int f(int); // expected-note {{candidate function}}
11 #if __cplusplus <= 199711L
12 // expected-note@-2 {{candidate function}}
15 int i1
= f
<1>(0); // expected-error{{call to 'f' is ambiguous}}
17 #if __cplusplus <= 199711L
18 // expected-error@-2{{call to 'f' is ambiguous}}
22 template<typename T
, T Value
>
25 template<typename T
, T Value
>
28 void g(X
<int, 10> x
) {
32 static const unsigned char ten
= 10;
33 template<typename T
, T Value
, typename U
>
34 void f2(X
<T
, Value
>, X
<U
, Value
>);
35 // expected-note@-1 {{candidate template ignored: deduced values of conflicting types for parameter 'Value' (10 of type 'int' vs. 10 of type 'char')}}
36 // expected-note@-2 {{candidate template ignored: deduced values of conflicting types for parameter 'Value' (10 of type 'char' vs. 10 of type 'int')}}
39 f2(X
<int, 10>(), X
<char, ten
>()); // expected-error {{no matching}}
40 f2(X
<char, 10>(), X
<int, ten
>()); // expected-error {{no matching}}