aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C
blob: 966da0cc3fa1d0039ed2c24a7650b7eb95f88330 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do compile { target c++20 } }

template <auto N>
struct A {
  static constexpr auto n = N;
};

template <auto N>
constexpr auto g(A<[]{return N;}> a) {
  return a.n();
}

static_assert(g<42>({}) == 42);