blob: c27261c96b68c11038eeb12ee412180f2ca8dcb9 [file] [log] [blame]
Douglas Gregor1a6e0342010-03-26 02:38:37 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
2
3template <int> int f(int); // expected-note 2{{candidate}}
4template <signed char> int f(int); // expected-note 2{{candidate}}
5int i1 = f<1>(0); // expected-error{{ambiguous}}
6int i2 = f<1000>(0); // expected-error{{ambiguous}}
Douglas Gregor4a0bac92010-03-26 05:57:46 +00007
8namespace PR6707 {
9 template<typename T, T Value>
10 struct X { };
11
12 template<typename T, T Value>
13 void f(X<T, Value>);
14
15 void g(X<int, 10> x) {
16 f(x);
17 }
18
19 static const unsigned char ten = 10;
20 template<typename T, T Value, typename U>
21 void f2(X<T, Value>, X<U, Value>);
22
23 void g2() {
24 f2(X<int, 10>(), X<char, ten>());
25 }
26}