summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/implicit1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/implicit1.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit1.C26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit1.C b/gcc/testsuite/g++.dg/cpp0x/implicit1.C
new file mode 100644
index 000000000..2efbde6a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit1.C
@@ -0,0 +1,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" }