diff options
Diffstat (limited to 'src/list')
-rw-r--r-- | src/list/operation/drop.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/list/operation/drop.h b/src/list/operation/drop.h new file mode 100644 index 0000000..651dad5 --- /dev/null +++ b/src/list/operation/drop.h @@ -0,0 +1,37 @@ +#ifndef TYPEASVALUE_SRC_LIST_OPERATION_DROP_H_ +#define TYPEASVALUE_SRC_LIST_OPERATION_DROP_H_ + +#include "operation/math.h" + +namespace tav { + +template < + typename Count, + typename Current +> +struct Drop { + typedef typename Drop< + Substract<Count, Size<1>>, + Tail<Current> + >::type type; +}; + +template <typename Current> +struct Drop<Size<0>, Current> { + typedef Current type; +}; + +template <typename Count> +struct Drop<Count, void> { + typedef void type; +}; + +template <> +struct Drop<Size<0>, void> { + typedef void type; +}; + + +} + +#endif // TYPEASVALUE_SRC_LIST_OPERATION_DROP_H_ |