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
re PR c++/79180 (Nested lambda-capture causes segfault for parameter pack)
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
lambda-generic-nested1.C
blob
4cfd353fa771b407e374231d70b8e1e1a11d4188
1
// PR c++/71386
2
// { dg-do run { target c++14 } }
3
4
template<class...XS>
5
auto List(XS...xs)
6
{
7
return [=](auto processList){return processList(xs...);};
8
}
9
10
auto l1 = List(42);
11
12
int test (int a)
13
{
14
if (a != 42)
15
__builtin_abort ();
16
return 0;
17
}
18
19
auto foo = [](auto... xs1)
20
{
21
return [=]()
22
{
23
return l1([=](auto)
24
{
25
return test (xs1...);
26
});
27
};
28
};
29
30
int main()
31
{
32
auto concat = l1(foo);
33
concat();
34
}