blob: ccdf697708240890ccdd4f299beac72d7d4e7674 [file] [log] [blame]
// { dg-do compile { target c++17 } }
constexpr auto add = [] (int n, int m) {
auto L = [=] { return n; };
auto R = [=] { return m; };
return [=] { return L() + R(); };
};
static_assert(add(3, 4)() == 7, "");