diff options
Diffstat (limited to 'src/list/operation/delete_nth.h')
-rw-r--r-- | src/list/operation/delete_nth.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/list/operation/delete_nth.h b/src/list/operation/delete_nth.h new file mode 100644 index 0000000..03df12a --- /dev/null +++ b/src/list/operation/delete_nth.h @@ -0,0 +1,21 @@ +#ifndef TYPEASVALUE_SRC_LIST_OPERATION_DELETE_NTH_H_ +#define TYPEASVALUE_SRC_LIST_OPERATION_DELETE_NTH_H_ + +#include "list/operation/append.h" +#include "list/operation/take.h" +#include "list/operation/drop.h" + +namespace tav { + +template < + typename Index, + typename List +> +using DeleteNth = Append< + typename Take<Index, List>::type, + typename Drop<Add<Index, Size<1>>, List>::type +>; + +} + +#endif // TYPEASVALUE_SRC_LIST_OPERATION_DELETE_NTH_H_ |