summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C
blob: 74215c99727c1e55a6638d73c29002438e6bbf23 (plain)
1
2
3
4
5
6
7
8
9
10
// { dg-options "-std=gnu++0x" }
template<typename... Args>              char& f(Args... args);         // #1
template<typename T1, typename... Args> short& f(T1 a1, Args... args); // #2
template<typename T1, typename T2>      int& f(T1 a2, T2 a3);          // #3

void g() {
  char& x = f();                      // calls #1
  short& y = f(1, 2, 3);              // calls #2
  int& z = f(1, 2);                   // calls #3
}