// { dg-options "--std=c++0x" } template struct same_type; template struct same_type {}; typedef int & lref; typedef int const & clref; typedef int && rref; typedef int const && crref; template struct S { typedef T & lref; typedef T const & clref; typedef T && rref; typedef T const && crref; }; void f() { same_type(); same_type(); same_type(); same_type(); same_type(); same_type(); same_type(); same_type::lref &, int &>(); same_type::lref &&, int &>(); same_type::rref &, int &>(); same_type::rref &&, int &&>(); same_type::rref, int const &>(); same_type::crref, int volatile &&>(); same_type::clref, int const &>(); }