diff options
Diffstat (limited to 'src/list/generator/make_list.h')
-rw-r--r-- | src/list/generator/make_list.h | 34 |
1 files changed, 8 insertions, 26 deletions
diff --git a/src/list/generator/make_list.h b/src/list/generator/make_list.h index 863dce2..ec49651 100644 --- a/src/list/generator/make_list.h +++ b/src/list/generator/make_list.h @@ -1,39 +1,21 @@ #ifndef TYPEASVALUE_SRC_LIST_GENERATOR_MAKE_LIST_H_ #define TYPEASVALUE_SRC_LIST_GENERATOR_MAKE_LIST_H_ -#include "list/cons.h" -#include "operation/math.h" +#include "pair.h" +#include "detail/generate_nested_structure.h" namespace tav { -namespace detail { - -template < - typename Count, - typename Element -> -struct MakeList { - typedef Cons< - Element, - Eval<MakeList< - Substract<Count, Size<1>>, - Element - >> - > type; -}; - -template <typename Element> -struct MakeList<Size<1>, Element> { - typedef Cons<Element, void> type; -}; - -} - template < typename Count, typename Element > -using MakeList = Eval<detail::MakeList<Count, Element>>; +using MakeList = Eval<detail::generate_nested_structure< + Pair, + Eval, + Element, + Count +>>; } |