aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-lambda15.C
blob: 29df5d0b1acc0bdca84df37cfb72edb86135eccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// PR c++/96960
// { dg-do compile { target c++20 } }

template <class, class> concept C0 = true;

template <class T>
concept C = requires(T t) {
  { 42 } -> C0<char [([] { return 42; }())]>;
};

static_assert(C<int>);

C0<char [([] { return 42; }())]> auto x = 42;

int f(C0<char [([] { return 42; }())]> auto x);
int y = f(42);