diff options
Diffstat (limited to 'src/list/generator/make_list.h')
-rw-r--r-- | src/list/generator/make_list.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/list/generator/make_list.h b/src/list/generator/make_list.h index d927905..863dce2 100644 --- a/src/list/generator/make_list.h +++ b/src/list/generator/make_list.h @@ -6,25 +6,35 @@ namespace tav { +namespace detail { + template < typename Count, typename Element > struct MakeList { - typedef Eval<Cons< + typedef Cons< Element, Eval<MakeList< Substract<Count, Size<1>>, Element >> - >> type; + > type; }; template <typename Element> struct MakeList<Size<1>, Element> { - typedef Eval<Cons<Element, void>> type; + typedef Cons<Element, void> type; }; } +template < + typename Count, + typename Element +> +using MakeList = Eval<detail::MakeList<Count, Element>>; + +} + #endif // TYPEASVALUE_SRC_LIST_GENERATOR_MAKE_LIST_H_ |