2017-06-14 Paolo Carlini <paolo.carlini@oracle.com>
[official-gcc.git] / gcc / testsuite / g++.dg / template / typedef34.C
bloba82e155e266269142af08a01bebe9dcde9fa96c1
1 // Origin PR c++/45200
2 // { dg-do compile }
4 template<typename T>
5 struct remove_reference
7   typedef T type;
8 };
10 template<typename TestType>
11 struct forward_as_lref
15 template<typename Seq, typename N>
16 struct apply1
18   typedef typename remove_reference<Seq>::type seq;
19   typedef forward_as_lref<typename seq::seq_type> type; //#0
22 template<typename Seq>
23 struct apply
25   typedef forward_as_lref<typename remove_reference<Seq>::type::seq_type> type; //#1
28 struct reverse_view
30   typedef int seq_type;
33 int
34 main()
36   apply<reverse_view >::type a2;