aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-new1.C
blob: 62007205108870e3ea825e772bd7d79eb1d0bc6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/108219
// { dg-do compile { target c++20 } }

template<class T>
concept C = requires { new T[1]{{ 42 }}; };

template<class T>
concept D = requires { new T[2][1]{{{ 42 }}, {{ 42 }}}; };

struct A { A(int); };

static_assert(C<A>);
static_assert(D<A>);