* g++.dg/*.C: Use target c++17 instead of explicit dg-options. * lib/g++-dg.exp: Don't test C++11 by default. Add C++17 to the list of default stds to test. From-SVN: r265343
9 lines
216 B
C
9 lines
216 B
C
// { 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, "");
|