| 1 |
// Origin: PR c++/43704 |
| 2 |
// { dg-do compile } |
| 3 |
|
| 4 |
template<typename T2, typename T3> |
| 5 |
struct if_ |
| 6 |
{ |
| 7 |
typedef T2 type; |
| 8 |
}; |
| 9 |
|
| 10 |
template<class I1> |
| 11 |
struct iterator_restrict_traits |
| 12 |
{ |
| 13 |
struct iterator_category {}; |
| 14 |
}; |
| 15 |
|
| 16 |
template<class T> |
| 17 |
struct matrix |
| 18 |
{ |
| 19 |
struct ci {struct ic {};}; |
| 20 |
class i {}; |
| 21 |
}; |
| 22 |
|
| 23 |
template<class M, class TRI> |
| 24 |
struct triangular_adaptor |
| 25 |
{ |
| 26 |
typedef typename if_<typename M::ci,typename M::i>::type ty1; |
| 27 |
class iterator2 : iterator_restrict_traits<typename ty1::ic>::iterator_category |
| 28 |
{ |
| 29 |
}; |
| 30 |
}; |
| 31 |
|
| 32 |
template<class M> |
| 33 |
struct banded_adaptor |
| 34 |
{ |
| 35 |
typedef typename if_<typename M::ci,typename M::i>::type ty1; |
| 36 |
class iterator1 : iterator_restrict_traits<typename ty1::ic>::iterator_category |
| 37 |
{ |
| 38 |
}; |
| 39 |
}; |
| 40 |
|
| 41 |
template<class T> |
| 42 |
struct singular_decomposition |
| 43 |
{ |
| 44 |
banded_adaptor<matrix<double> >::iterator1 it1; |
| 45 |
}; |
| 46 |
|