repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/86728 - C variadic generic lambda.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
vt-60130.C
blob
50662dbe07eafbb0464d5e7126209b7aee695126
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
}