aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/overload/template5.C
blob: b1dc65ebe1805c3d1ca7bc137f671ba20a5ca45b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do compile }

template<typename T>
int low(T a, T b, T c) { return a + b + c; } // { dg-message "template" }

template<typename T>
int high(T a, T b, T c) { return a + b + c; } // { dg-message "template" }

int test (void)
{
  low (5, 6);			// { dg-error "no matching function" }
  // { dg-message "(candidate|3 arguments, 2 provided)" "" { target *-*-* } 11 }
  high (5, 6, 7, 8);		// { dg-error "no matching function" }
  // { dg-message "(candidate|3 arguments, 4 provided)" "" { target *-*-* } 13 }
}