Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/vt-60130.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 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 } |