diff mbox

[C++,testcase,committed] PR 54812

Message ID 526A4EAB.6000805@oracle.com
State New
Headers show

Commit Message

Paolo Carlini Oct. 25, 2013, 10:57 a.m. UTC
Hi,

I had a look to the testcases Jason added / tweaked in his recent patch 
about trivial but non-callable [cd]tors: I think a simple testcase 
directly from 54812 cannot hurt.

Thanks,
Paolo.

////////////////
2013-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54812
	* g++.dg/cpp0x/defaulted47.C: New.
diff mbox

Patch

Index: g++.dg/cpp0x/defaulted47.C
===================================================================
--- g++.dg/cpp0x/defaulted47.C	(revision 0)
+++ g++.dg/cpp0x/defaulted47.C	(working copy)
@@ -0,0 +1,16 @@ 
+// PR c++/54812
+// { dg-do compile { target c++11 } }
+
+class A
+{
+  A() = default;   // { dg-error "private" }
+};
+
+A a;               // { dg-error "context" }
+
+class B
+{
+  ~B() = default;  // { dg-error "private" }
+};
+
+B b;               // { dg-error "context" }