// { dg-do compile } // { dg-options "-std=c++0x" } template struct is_same { static const bool value = false; }; template struct is_same { static const bool value = true; }; int&& f(const int&) {} int&& (*fp)(const int&) = f; int&& (&fr)(const int&) = f; struct X { int&& f(const int&); }; int&& (X::*mfp)(const int&) = &X::f; void g(X& xr, X* xp) { int i; static_assert(is_same::value, "direct call"); static_assert(is_same::value, "pointer"); static_assert(is_same::value, "dereferenced pointer"); static_assert(is_same::value, "reference"); static_assert(is_same::value, "member function call"); static_assert(is_same::value, "member function pointer with .*"); static_assert(is_same*mfp)(i)), int&&>::value, "member function pointer with ->*"); }