Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/constexpr-new21.C

raw
1 // PR c++/100495
2 // { dg-do compile { target c++20 } }
3
4 struct S {
5 constexpr virtual ~S () {}
6 };
7
8 constexpr bool
9 foo ()
10 {
11 S *p = new S ();
12 delete p;
13 return true;
14 }
15
16 constexpr bool x = foo ();
17 static_assert (x);