// { dg-require-effective-target c++11 } template struct ST; template struct ST {}; struct A { int f() &; char f() &&; }; template struct B { int f() &; char f() &&; }; int main() { A a; a.f(); A().f(); ST(); ST(); B b; b.f(); B().f(); ST(); ST().f()), char>(); }