OSDN Git Service

PR c++/39055
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / overload / template5.C
1 // { dg-do compile }
2
3 template<typename T>
4 int low(T a, T b, T c) { return a + b + c; } // { dg-message "template" }
5
6 template<typename T>
7 int high(T a, T b, T c) { return a + b + c; } // { dg-message "template" }
8
9 int test (void)
10 {
11   low (5, 6);                   // { dg-error "no matching function" }
12   // { dg-message "(candidate|3 arguments, 2 provided)" "" { target *-*-* } 11 }
13   high (5, 6, 7, 8);            // { dg-error "no matching function" }
14   // { dg-message "(candidate|3 arguments, 4 provided)" "" { target *-*-* } 13 }
15 }