aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/overload/template4.C
blob: 8f00d4171d4d994f68aa92879292498268d068e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR c++/35986
// { dg-do compile }

namespace
{
  template <int> void foo (...);	// { dg-message "foo" }
  template <int> void bar (int, ...);	// { dg-message "bar" }
  void baz (...);			// { dg-message "baz" }
}

template <int> void foo (...);		// { dg-message "note" }
template <int> void bar (int, ...);	// { dg-message "note" }
void baz (...);				// { dg-message "note" }

void
test ()
{
  foo <0> (0);		// { dg-error "is ambiguous" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 18 }
  bar <1> (0, 1);	// { dg-error "is ambiguous" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 20 }
  baz (0);		// { dg-error "is ambiguous" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
}