summaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-defaulted-functions.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:44:14 +0000
commit2b6b257f4e5503a7a2675bdb8735693db769f75c (patch)
treee85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/SemaCXX/cxx0x-defaulted-functions.cpp
parentb4348ed0b7e90c0831b925fbee00b5f179a99796 (diff)
Notes
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;
+}
+}