From d784ea23f643582063c9bfb5b6cafd92362dd2af Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 16 Jan 2016 03:58:12 +0100 Subject: [PATCH] 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` --- src/lib/meta/typelist.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/lib/meta/typelist.hpp b/src/lib/meta/typelist.hpp index d0cbb44f3..53474572e 100644 --- a/src/lib/meta/typelist.hpp +++ b/src/lib/meta/typelist.hpp @@ -85,6 +85,10 @@ namespace meta { typedef T Tail; }; + typedef Node 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 List; + using List = Node; + using Seq = Types; }; template<> struct Types<> { - typedef NullType List; - typedef Types<> Seq; + using List = NullType; + using Seq = Types<>; }; - typedef Node NodeNull; - }} // namespace lib::meta #endif