From 6230d0ba4138d8db769be5d52cd7f25f3dd62fa2 Mon Sep 17 00:00:00 2001 From: Bjorn Reese Date: Sat, 17 Jun 2017 16:52:52 +0200 Subject: [PATCH 1/2] Added illustrations for mp_drop_c, mp_take_c, mp_insert_c, and mp_erase_c --- doc/mp11/algorithm.adoc | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/mp11/algorithm.adoc b/doc/mp11/algorithm.adoc index 8ba3884..855fdef 100644 --- a/doc/mp11/algorithm.adoc +++ b/doc/mp11/algorithm.adoc @@ -283,6 +283,14 @@ As `mp_product`, but takes a quoted metafunction. `mp_drop_c` removes the first `N` elements of `L` and returns the result. +.mp_drop_c +[cols="<.^4m,6*^.^1m",width=85%] +|=== +|*L1*|A~1~|...|A~m~|A~m+1~|...|A~n~ +7+| +|*mp_drop_c*|A~m+1~|...|A~n~ 3+| +|=== + ## mp_drop template using mp_drop = /*...*/; @@ -327,6 +335,14 @@ Same as `mp_at_c`, but with a type argument `I`. `I::value` must be a nonnegativ `mp_take_c` returns a list of the same type as `L` containing the first `N` elements of `L`. +.mp_take_c +[cols="<.^4m,6*^.^1m",width=85%] +|=== +|*L1*|A~1~|...|A~m~|A~m+1~|...|A~n~ +7+| +|*mp_take_c*|A~1~|...|A~m~ 3+| +|=== + ## mp_take template using mp_take = /*...*/; @@ -340,6 +356,14 @@ Same as `mp_take_c`, but with a type argument `N`. `N::value` must be a nonnegat Inserts the elements `T...` into the list `L` at position `I` (a zero-based index). +.mp_insert_c with two elements +[cols="<.^4m,8*^.^1m",width=85%] +|=== +|*L1*|A~1~|...|A~m~|A~m+1~|...|A~n~ 2+| +9+| +|*mp_insert_c*|A~1~|...|A~m~|B~1~|B~2~|A~m+1~|...|A~n~ +|=== + ## mp_insert template using mp_insert = @@ -354,6 +378,14 @@ Same as `mp_insert_c`, but with a type argument `I`. Removes from the list `L` the elements with indices from `I` (inclusive) to `J` (exclusive). +.mp_erase_c +[cols="<.^4m,9*^.^1m",width=85%] +|=== +|*L1*|A~0~|...|A~i-1~|A~i~|...|A~j-1~|A~j~|...|A~n-1~ +10+| +|*mp_erase_c*|A~0~|...|A~i-1~|A~j~|...|A~n-1~ 3+| +|=== + ## mp_erase template using mp_erase = From f9d5592e487fe4feb4a6cf2f9085cea07409c1b0 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 17 Jun 2017 18:53:10 +0300 Subject: [PATCH 2/2] Remove \ No newline at end of file diff --git a/doc/mp11-docinfo-footer.html b/doc/mp11-docinfo-footer.html index 8cf495c..e81781d 100644 --- a/doc/mp11-docinfo-footer.html +++ b/doc/mp11-docinfo-footer.html @@ -4,30 +4,3 @@ table tr.even, table tr.alt, table tr:nth-of-type(even) { background: none; } - -