Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp0x/vt-60130.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
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 } |