From 9769b8fe1956b080c1f249f8c17862c0b5f5e4ef Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 12 Feb 2015 22:03:26 +0100 Subject: Added previously missing `Drop` implementation --- src/list/operation/drop.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/list/operation/drop.h 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>, + Tail + >::type type; +}; + +template +struct Drop, Current> { + typedef Current type; +}; + +template +struct Drop { + typedef void type; +}; + +template <> +struct Drop, void> { + typedef void type; +}; + + +} + +#endif // TYPEASVALUE_SRC_LIST_OPERATION_DROP_H_ -- cgit v1.2.3