* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / collapse.C
blobb537bb5839823cd649a22ab81d9c509f9d42455e
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> {};
5 typedef int & lref;
6 typedef int const & clref;
7 typedef int && rref;
8 typedef int const && crref;
10 template<typename T>
11 struct S
13   typedef T & lref;
14   typedef T const & clref;
15   typedef T && rref;
16   typedef T const && crref;
19 void f()
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 &>();