diff --git a/doc/mp11/algorithm.adoc b/doc/mp11/algorithm.adoc index a3b4553..2e5e126 100644 --- a/doc/mp11/algorithm.adoc +++ b/doc/mp11/algorithm.adoc @@ -414,6 +414,28 @@ Supports a value list as `L` under {cpp}17. Same as `mp_take_c`, but with a type argument `N`. `N::value` must be a nonnegative number. +## mp_slice_c + + template using mp_slice_c = mp_drop_c, I>; + +`mp_slice_c` returns a list of the same form as `L` containing the elements from index `I` (inclusive) to index `J` (exclusive). + +Supports a value list as `L` under {cpp}17. + +.mp_slice_c +[cols="<.^4m,8*^.^1m",width=85%] +|=== +|*L1*|A~0~|...|A~i~|...|A~j-1~|A~j~|...|A~n-1~ +9+| +|*mp_slice_c* 2+>||A~i~|...|A~j-1~ 3+| +|=== + +## mp_slice + + template using mp_slice = mp_drop, I>; + +Same as `mp_slice_c`, but with type arguments `I` and `J`. `I::value` and `J::value` must be nonnegative numbers. + ## mp_back template using mp_back = mp_at_c::value - 1>;