blob: 1551746b42ba41da9c1bbc3f40e4962ef6d77541 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// 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());
|