forked from boostorg/mp11
Update documentation
This commit is contained in:
@@ -235,6 +235,8 @@ otherwise.
|
||||
|
||||
`mp_repeat_c<L, N>` 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<int>;
|
||||
@@ -248,6 +250,9 @@ using R3 = mp_repeat_c<L3, 2>; // mp_list<int, float, int, float>
|
||||
|
||||
using L4 = mp_list<int, float, double>;
|
||||
using R4 = mp_repeat_c<L4, 0>; // mp_list<>
|
||||
|
||||
using L5 = mp_list_v<true, 8>;
|
||||
using R5 = mp_repeat_c<L5, 2>; // mp_list_v<true, 8, true, 8>
|
||||
```
|
||||
|
||||
## mp_repeat<L, N>
|
||||
@@ -256,6 +261,8 @@ using R4 = mp_repeat_c<L4, 0>; // 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<F, L...>
|
||||
|
||||
template<template<class...> class F, class... L> using mp_product = /*...*/;
|
||||
|
@@ -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 `<boost/mp11/list.hpp>`.
|
||||
* Added value list support to `mp_repeat`.
|
||||
|
||||
## Changes in 1.79.0
|
||||
|
||||
|
@@ -45,6 +45,12 @@ The standard value list type of Mp11. Requires {cpp}17.
|
||||
|
||||
`mp_is_list<L>` 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<L>
|
||||
|
||||
template<class L> using mp_is_value_list = /*...*/;
|
||||
|
||||
`mp_is_value_list<L>` 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<L>
|
||||
|
||||
template<class L> using mp_size = /*...*/;
|
||||
@@ -407,6 +413,8 @@ using R1 = mp_rename_v<L1, mp_list_v>; // mp_list_v<false, 7>;
|
||||
`mp_append<L...>` 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<L1<T1...>, L2<T2...>, ..., Ln<Tn...>>` is an alias for `L1<T1..., T2..., ..., Tn...>`.
|
||||
|
||||
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<double, long double>;
|
||||
@@ -418,6 +426,14 @@ using R1 = mp_append<L1, L2, L3, L4>;
|
||||
// std::tuple<double, long double, int, short, long>
|
||||
```
|
||||
|
||||
.Using mp_append with value lists
|
||||
```
|
||||
using L1 = mp_list_v<true, false>;
|
||||
using L2 = mp_list_v<0, 1, 2, 3>;
|
||||
|
||||
using R1 = mp_append<L1, L2>; // mp_list_v<true, false, 0, 1, 2, 3>
|
||||
```
|
||||
|
||||
## mp_replace_front<L, T>
|
||||
|
||||
template<class L, class T> using mp_replace_front = /*...*/;
|
||||
|
Reference in New Issue
Block a user