diff --git a/doc/mp11/algorithm.adoc b/doc/mp11/algorithm.adoc index fa6b594..040cf6e 100644 --- a/doc/mp11/algorithm.adoc +++ b/doc/mp11/algorithm.adoc @@ -235,6 +235,8 @@ otherwise. `mp_repeat_c` returns a list of the same form as `L` that consists of `N` concatenated copies of `L`. +Supports value lists as `L` under {cpp}17. + .Using mp_repeat_c ``` using L1 = tuple; @@ -248,6 +250,9 @@ using R3 = mp_repeat_c; // mp_list using L4 = mp_list; using R4 = mp_repeat_c; // mp_list<> + +using L5 = mp_list_v; +using R5 = mp_repeat_c; // mp_list_v ``` ## mp_repeat @@ -256,6 +261,8 @@ using R4 = mp_repeat_c; // mp_list<> Same as `mp_repeat_c` but with a type argument `N`. The number of copies is `N::value` and must be nonnegative. +Supports value lists as `L` under {cpp}17. + ## mp_product template class F, class... L> using mp_product = /*...*/; diff --git a/doc/mp11/changelog.adoc b/doc/mp11/changelog.adoc index 37d4c8d..cd4c0f5 100644 --- a/doc/mp11/changelog.adoc +++ b/doc/mp11/changelog.adoc @@ -13,8 +13,9 @@ http://www.boost.org/LICENSE_1_0.txt ## Changes in 1.83.0 * Added an offset/from parameter to `mp_from_sequence`, `mp_iota`, `mp_iota_c`. -* Added `mp_value`, `mp_list_v`, `mp_rename_v`. -* Added value list support to list primitives. +* Added `mp_value`, `mp_list_v`, `mp_rename_v`, `mp_is_value_list`. +* Added value list support to the primitives in ``. +* Added value list support to `mp_repeat`. ## Changes in 1.79.0 diff --git a/doc/mp11/list.adoc b/doc/mp11/list.adoc index 038f4b1..4529afd 100644 --- a/doc/mp11/list.adoc +++ b/doc/mp11/list.adoc @@ -45,6 +45,12 @@ The standard value list type of Mp11. Requires {cpp}17. `mp_is_list` is `mp_true` if `L` is a list (an instantiation of a class template whose template parameters are types), `mp_false` otherwise. +## mp_is_value_list + + template using mp_is_value_list = /*...*/; + +`mp_is_value_list` is `mp_true` under {cpp}17 if `L` is a value list (an instantiation of a class template whose template parameters are all values), `mp_false` otherwise. + ## mp_size template using mp_size = /*...*/; @@ -407,6 +413,8 @@ using R1 = mp_rename_v; // mp_list_v; `mp_append` concatenates the lists in `L...` into a single list that has the same type as the first list. `mp_append<>` is an alias for `mp_list<>`. `mp_append, L2, ..., Ln>` is an alias for `L1`. +Supports value lists under {cpp}17, but mixing type lists and value lists in the same `mp_append` is not supported. + .Using mp_append with lists of various types ``` using L1 = std::tuple; @@ -418,6 +426,14 @@ using R1 = mp_append; // std::tuple ``` +.Using mp_append with value lists +``` +using L1 = mp_list_v; +using L2 = mp_list_v<0, 1, 2, 3>; + +using R1 = mp_append; // mp_list_v +``` + ## mp_replace_front template using mp_replace_front = /*...*/;