aboutsummaryrefslogtreecommitdiff
path: root/test/PCH/cxx0x-default-delete.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/PCH/cxx0x-default-delete.cpp')
-rw-r--r--test/PCH/cxx0x-default-delete.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/PCH/cxx0x-default-delete.cpp b/test/PCH/cxx0x-default-delete.cpp
index 39a90b858fd2..230f6a614715 100644
--- a/test/PCH/cxx0x-default-delete.cpp
+++ b/test/PCH/cxx0x-default-delete.cpp
@@ -20,6 +20,11 @@ class quux {
~quux() = default;
};
+struct A {
+ A(const A&) = default;
+ template<typename T> A(T&&);
+};
+
#else
foo::foo() { } // expected-error{{definition of explicitly defaulted default constructor}}
@@ -31,4 +36,11 @@ void fn() {
baz bz; // expected-error{{deleted function}} expected-note@16{{deleted here}}
quux qx; // expected-error{{private destructor}} expected-note@20{{private here}}
+struct B { A a; };
+struct C { mutable A a; };
+static_assert(__is_trivially_constructible(B, const B&), "");
+static_assert(!__is_trivially_constructible(B, B&&), "");
+static_assert(!__is_trivially_constructible(C, const C&), "");
+static_assert(!__is_trivially_constructible(C, C&&), "");
+
#endif