aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C
blob: e3d26e5a78faa825e39d0246ca6abbfc97426995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
};