diff options
author | Adrian Kummerlaender | 2015-02-12 22:03:26 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-02-12 22:03:26 +0100 |
commit | 9769b8fe1956b080c1f249f8c17862c0b5f5e4ef (patch) | |
tree | ebc7c676f468c950fd732d0840a1bc24795235cd | |
parent | 246cb31c1e20cdcc21a6a607de4b0095c71315d6 (diff) | |
download | TypeAsValue-9769b8fe1956b080c1f249f8c17862c0b5f5e4ef.tar TypeAsValue-9769b8fe1956b080c1f249f8c17862c0b5f5e4ef.tar.gz TypeAsValue-9769b8fe1956b080c1f249f8c17862c0b5f5e4ef.tar.bz2 TypeAsValue-9769b8fe1956b080c1f249f8c17862c0b5f5e4ef.tar.lz TypeAsValue-9769b8fe1956b080c1f249f8c17862c0b5f5e4ef.tar.xz TypeAsValue-9769b8fe1956b080c1f249f8c17862c0b5f5e4ef.tar.zst TypeAsValue-9769b8fe1956b080c1f249f8c17862c0b5f5e4ef.zip |
Added previously missing `Drop` implementation
-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_ |