blob: 2efbde6a93a265ba43b328f526a7a2891ee2e641 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Test for implicitly deleted destructors.
// { dg-options "-std=c++0x" }
// { dg-prune-output "default definition would be ill-formed" }
// { dg-prune-output "within this context" }
class C
{
void operator delete (void *); // { dg-error "private" }
public:
virtual ~C(); // { dg-error "overriding" }
};
struct D: C { }; // { dg-error "deleted" }
D d; // { dg-error "deleted" }
struct E
{
~E() = delete; // { dg-error "declared here" }
};
struct F
{
virtual ~F(); // { dg-error "overriding" }
};
struct G: E, F { }; // { dg-error "deleted" }
|