Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp1y/lambda-generic-nested1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/71386 // { dg-do run { target c++14 } } template<class...XS> auto List(XS...xs) { return [=](auto processList){return processList(xs...);}; } auto l1 = List(42); int test (int a) { if (a != 42) __builtin_abort (); return 0; } auto foo = [](auto... xs1) { return [=]() { return l1([=](auto) { return test (xs1...); }); }; }; int main() { auto concat = l1(foo); concat(); }