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

constexpr bool
foo ()
{
  auto a = new int;
  auto b = new int;
  bool r = a == b;
  delete b;
  delete a;
  return r;
}

static_assert (!foo ());