| 1 |
// Origin PR c++/45200 |
| 2 |
// { dg-do compile } |
| 3 |
|
| 4 |
template<typename T> |
| 5 |
struct remove_reference |
| 6 |
{ |
| 7 |
typedef T type; |
| 8 |
}; |
| 9 |
|
| 10 |
template<typename TestType> |
| 11 |
struct forward_as_lref |
| 12 |
{ |
| 13 |
}; |
| 14 |
|
| 15 |
template<typename Seq, typename N> |
| 16 |
struct apply1 |
| 17 |
{ |
| 18 |
typedef typename remove_reference<Seq>::type seq; |
| 19 |
typedef forward_as_lref<typename seq::seq_type> type; //#0 |
| 20 |
}; |
| 21 |
|
| 22 |
template<typename Seq> |
| 23 |
struct apply |
| 24 |
{ |
| 25 |
typedef forward_as_lref<typename remove_reference<Seq>::type::seq_type> type; //#1 |
| 26 |
}; |
| 27 |
|
| 28 |
struct reverse_view |
| 29 |
{ |
| 30 |
typedef int seq_type; |
| 31 |
}; |
| 32 |
|
| 33 |
int |
| 34 |
main() |
| 35 |
{ |
| 36 |
apply<reverse_view >::type a2; |
| 37 |
} |