Implement P0315R4, Lambdas in unevaluated contexts.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp2a / lambda-uneval8.C
blob3692154f9becda7b5f966b8365bb26303ea6150a
1 // { dg-do compile { target c++2a } }
3 template <auto N>
4 struct A {
5   static constexpr auto n = N;
6 };
8 template <auto N>
9 constexpr auto g(A<[]{return N;}> a) {
10   return a.n();
13 static_assert(g<42>({}) == 42);