8sa1-gcc/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda5.C
Marek Polacek be515b4ce0 *.C: Use target c++17 instead of explicit dg-options.
* 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
2018-10-20 17:21:19 +00:00

8 lines
171 B
C

// { dg-do compile { target c++17 } }
auto addOne = [] (int n) {
return n + 1;
};
constexpr int (*addOneFp)(int) = addOne;
static_assert(addOneFp(3) == addOne(3), "");