Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/variadic-ex6.C

raw
1 // { dg-do compile { target c++11 } }
2 template<class...> struct Tuple { };
3
4 template<class... Types> void f(Types&...);
5 template<class... Types1, class... Types2> void g(Tuple<Types1...>, Tuple<Types2...>);
6
7 void h(int x, float& y)
8 {
9 const int z = x;
10 f(x, y, z); // Types is deduced to int, const int, float
11 g(Tuple<short, int, long>(), Tuple<float, double>()); // Types1 is deduced to short, int long
12 // Types2 is deduced to float, double
13 }