gcc/testsuite/g++.dg/cpp1y/pr87322.C
raw| 1 | // { dg-do compile { target c++14 } } |
| 2 | |
| 3 | #include <array> |
| 4 | #include <algorithm> |
| 5 | |
| 6 | int main() |
| 7 | { |
| 8 | constexpr std::array<std::array<double,2>,3> my_mat { |
| 9 | { { 1., 1. }, |
| 10 | { 1., 1. }, |
| 11 | { 1., 1. }, } |
| 12 | }; |
| 13 | |
| 14 | std::for_each(my_mat.begin(), my_mat.end(), [ |
| 15 | inner_func = [] (auto a, auto b) { return a + b; } ](auto& row) { |
| 16 | std::for_each(row.begin(), row.end(), [&, |
| 17 | inner_func2 = [] (auto a, auto b) { return a + b; } ] |
| 18 | (const double&) { |
| 19 | return; |
| 20 | }); |
| 21 | }); |
| 22 | |
| 23 | } |