Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
constexpr-dtor10.C
blob: 1551746b42ba41da9c1bbc3f40e4962ef6d77541 [
file
] [
log
] [
blame
]
// PR c++/97427
// { dg-do compile { target c++20 } }
struct
Foo
{
int
n
=
1
;
constexpr
~
Foo
()
{
n
=
0
;
}
};
constexpr
bool
foo
()
{
const
Foo
b
;
return
true
;
}
static_assert
(
foo
());