Debian Codegraph @

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

raw
1 // PR c++/98988
2 // { dg-do compile { target c++20 } }
3 // { dg-options "-fno-delete-null-pointer-checks" }
4
5 constexpr bool
6 foo ()
7 {
8 auto ptr = new int();
9 delete ptr;
10 return true;
11 }
12
13 static_assert (foo ());