#ifndef TYPEASVALUE_SRC_LIST_OPERATION_BASIC_H_ #define TYPEASVALUE_SRC_LIST_OPERATION_BASIC_H_ #include "operation/math.h" namespace tav { template struct Length { typedef Add< Size<1>, typename Length >::type> type; }; template <> struct Length { typedef Size<0> type; }; template < typename Index, typename Cons > struct Nth { typedef typename Nth< Substract>, Tail >::type type; }; template struct Nth { typedef void type; }; template struct Nth, Cons> { typedef Head type; }; template < typename Count, typename Current > struct Take { typedef Cons< Head, typename Take< Substract>, Tail >::type > type; }; template struct Take, Current> { typedef void type; }; template struct Take { typedef void type; }; template <> struct Take, void> { typedef void type; }; } #endif // TYPEASVALUE_SRC_LIST_OPERATION_BASIC_H_