aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/special/class.copy/p13-0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/special/class.copy/p13-0x.cpp')
-rw-r--r--test/CXX/special/class.copy/p13-0x.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CXX/special/class.copy/p13-0x.cpp b/test/CXX/special/class.copy/p13-0x.cpp
index 5d436016a056..16c8a4029cba 100644
--- a/test/CXX/special/class.copy/p13-0x.cpp
+++ b/test/CXX/special/class.copy/p13-0x.cpp
@@ -114,3 +114,18 @@ namespace PR13052 {
friend constexpr S<W>::S(const S<W>&) noexcept;
};
}
+
+namespace Mutable {
+ struct A {
+ constexpr A(A &);
+ A(const A &);
+ };
+ struct B {
+ constexpr B(const B &) = default; // ok
+ mutable A a;
+ };
+ struct C {
+ constexpr C(const C &) = default; // expected-error {{not constexpr}}
+ A a;
+ };
+}