aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C b/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C
new file mode 100644
index 000000000..e3d26e5a7
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C
@@ -0,0 +1,13 @@
+// 13.1: ...cannot be overloaded if any of them, but not all, have a
+// ref-qualifier.
+
+// { dg-require-effective-target c++11 }
+
+class Y {
+ void h() &;
+ void h() const &; // OK
+ void h() &&; // OK, all declarations have a ref-qualifier
+ void i() &; // { dg-message "" }
+ void i() const; // { dg-error "" } prior declaration of i
+ // has a ref-qualifier
+};