Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/vt-60130.C

raw
1 // PR c++/60130
2 // { dg-do compile { target c++11 } }
3
4 #include <tuple>
5
6 template <class S, class F, class... T>
7 S f1(F f, T... x)
8 {
9 return std::get<0>(std::make_tuple(f(x)...));
10 }
11
12 template <class... T>
13 int f2(const T... x)
14 {
15 return std::get<0>(std::make_tuple(f1<T>([](int n){return n;}, x)...));
16 }
17
18 int main()
19 {
20 return f2(42);
21 }