summaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-defaulted-functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/cxx0x-defaulted-functions.cpp')
-rw-r--r--test/SemaCXX/cxx0x-defaulted-functions.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx0x-defaulted-functions.cpp b/test/SemaCXX/cxx0x-defaulted-functions.cpp
index 617a25716314..16e20ff4964d 100644
--- a/test/SemaCXX/cxx0x-defaulted-functions.cpp
+++ b/test/SemaCXX/cxx0x-defaulted-functions.cpp
@@ -150,6 +150,14 @@ namespace PR13527 {
Y::~Y() = default; // expected-error {{definition of explicitly defaulted}}
}
+namespace PR27699 {
+ struct X {
+ X();
+ };
+ X::X() = default; // expected-note {{here}}
+ X::X() = default; // expected-error {{redefinition of 'X'}}
+}
+
namespace PR14577 {
template<typename T>
struct Outer {
@@ -188,3 +196,15 @@ namespace PR15597 {
A<int> a;
B<int> b; // expected-note {{here}}
}
+
+namespace PR27941 {
+struct ExplicitBool {
+ ExplicitBool &operator=(bool) = default; // expected-error{{only special member functions may be defaulted}}
+ int member;
+};
+
+int fn() {
+ ExplicitBool t;
+ t = true;
+}
+}