augment typelist definition to allow for rebinding
This definition -- together with the already existing specialisation in typeseq-util, allows always to rebind from a given type-list back to the corresponding type-sequence, by accessing the type member `Seq`
This commit is contained in:
parent
c4adc234b4
commit
d784ea23f6
1 changed files with 8 additions and 5 deletions
|
|
@ -85,6 +85,10 @@ namespace meta {
|
|||
typedef T Tail;
|
||||
};
|
||||
|
||||
typedef Node<NullType,NullType> NodeNull;
|
||||
|
||||
|
||||
|
||||
template
|
||||
< class T01=NullType
|
||||
, class T02=NullType
|
||||
|
|
@ -115,19 +119,18 @@ namespace meta {
|
|||
, T13, T14, T15, T16
|
||||
, T17, T18, T19, T20>::List ListTail;
|
||||
public:
|
||||
typedef Node<T01, ListTail> List;
|
||||
using List = Node<T01, ListTail>;
|
||||
using Seq = Types;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct Types<>
|
||||
{
|
||||
typedef NullType List;
|
||||
typedef Types<> Seq;
|
||||
using List = NullType;
|
||||
using Seq = Types<>;
|
||||
};
|
||||
|
||||
|
||||
typedef Node<NullType,NullType> NodeNull;
|
||||
|
||||
|
||||
}} // namespace lib::meta
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue