p2-0x.cpp revision 57c9f4f278fe15dc4964f2999486ffdbabce635c
1// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s 2 3// Member function declarations with the same name and the same 4// parameter-type-list as well as mem- ber function template 5// declarations with the same name, the same parameter-type-list, and 6// the same template parameter lists cannot be overloaded if any of 7// them, but not all, have a ref-qualifier (8.3.5). 8 9class Y { 10 void h() &; 11 void h() const &; 12 void h() &&; 13 void i() &; 14 void i() const; // FIXME: expected an error here! 15 16 template<typename T> void f(T*) &; 17 template<typename T> void f(T*) &&; 18 19 template<typename T> void g(T*) &; 20 template<typename T> void g(T*); // FIXME: expected an error here 21}; 22