1 // { dg-do compile { target c++11 } }
2 template<typename T, typename U> struct same_type;
3 template<typename T> struct same_type<T, T> {};
6 typedef int const & clref;
8 typedef int const && crref;
14 typedef T const & clref;
16 typedef T const && crref;
21 same_type<lref &, int &>();
22 same_type<lref &&, int &>();
23 same_type<rref &, int &>();
24 same_type<rref &&, int &&>();
26 same_type<rref const &, int &>();
27 same_type<crref volatile &&, int const &&>();
28 same_type<clref const &&, int const &>();
30 same_type<S<int &>::lref &, int &>();
31 same_type<S<int &&>::lref &&, int &>();
32 same_type<S<int &>::rref &, int &>();
33 same_type<S<int &&>::rref &&, int &&>();
35 same_type<S<int const &>::rref, int const &>();
36 same_type<S<int volatile &&>::crref, int volatile &&>();
37 same_type<S<int const &&>::clref, int const &>();