Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/explicit77.C

raw
1 // { dg-do assemble }
2
3 template <int I, int J, int K>
4 struct S {};
5
6 template <int I, int J>
7 struct S<I, J, 2> : public S<I, I, I>, S<J, J, J> {};
8
9 template <int I, int J, int K>
10 void f(S<I, J, K>, S<I, I, I>); // { dg-message "note" }
11
12 void g() {
13 S<0, 0, 0> s0;
14 S<0, 1, 2> s2;
15
16 f<0>(s0, s2);
17 f(s0, s2); // { dg-error "" } no matching function
18 // { dg-message "(candidate|deduced conflicting|ambiguous base class)" "candidate note" { target *-*-* } .-1 }
19 }