aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted36.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted36.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted36.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted36.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted36.C
new file mode 100644
index 0000000..1360f60
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted36.C
@@ -0,0 +1,24 @@
+// PR c++/53733
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+struct wrap
+{
+ wrap() = default;
+ wrap(wrap&&) = default; // Line 5
+ wrap(const wrap&) = default;
+
+ T t;
+};
+
+struct S {
+ S() = default;
+ S(const S&){}
+ S(S&&) = default;
+};
+
+typedef wrap<const S> W;
+
+W get() { return W(); } // Line 19
+
+int main() {}