| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
template<int... Indexes> |
| 3 |
struct _Index_tuple { }; |
| 4 |
|
| 5 |
template<int _Num, typename _Tuple = _Index_tuple<> > |
| 6 |
struct _Build_index_tuple; |
| 7 |
|
| 8 |
template<int _Num, int... _Indexes> |
| 9 |
struct _Build_index_tuple<_Num, _Index_tuple<_Indexes...> > |
| 10 |
: _Build_index_tuple<_Num - 1, |
| 11 |
_Index_tuple<_Indexes..., sizeof...(_Indexes)> > |
| 12 |
{ |
| 13 |
}; |
| 14 |
|
| 15 |
template<int... _Indexes> |
| 16 |
struct _Build_index_tuple<0, _Index_tuple<_Indexes...> > |
| 17 |
{ |
| 18 |
typedef _Index_tuple<_Indexes...> __type; |
| 19 |
}; |