forked from boostorg/mp11
Fix typo
This commit is contained in:
1 parent
8bffdd64b5
commit
4fee76f416
5 files changed
+12
-12
No files matched your search
@@ -71,7 +71,7 @@ using R1 = mp_all<mp_transform<eq, L1, L2>>; // mp_true
|
||||
|
||||
As `mp_transform`, but takes a quoted metafunction.
|
||||
|
||||
.Using mp_transform_q to count the occurences of `void` in a list
|
||||
.Using mp_transform_q to count the occurrences of `void` in a list
|
||||
```
|
||||
using L1 = std::tuple<void, int, float, void, int>;
|
||||
|
||||
@@ -97,7 +97,7 @@ using R1 = mp_apply<mp_plus,
|
||||
`mp_transform_if<P, F, L1, L2, ..., Ln>` replaces the elements of the list `L1` for which `mp_to_bool<P<T1, T2, ..., Tn>>` is `mp_true` with
|
||||
`F<T1, T2, ..., Tn>`, and returns the result, where `Ti` are the corresponding elements of `Li`.
|
||||
|
||||
.Using mp_transform_if to replace the occurences of 'void' in a list with the corresponding elements of a second list
|
||||
.Using mp_transform_if to replace the occurrences of 'void' in a list with the corresponding elements of a second list
|
||||
```
|
||||
using L1 = std::tuple<void, int, float, void, int>;
|
||||
using L2 = std::tuple<char[1], char[2], char[3], char[4], char[5]>;
|
||||
@@ -128,7 +128,7 @@ using R1 = mp_transform_if<first_is_void, second, L1, L2>;
|
||||
|
||||
As `mp_transform_if`, but takes quoted metafunctions.
|
||||
|
||||
.Using mp_transform_if_q to replace the occurences of 'void' in a list with the corresponding elements of a second list
|
||||
.Using mp_transform_if_q to replace the occurrences of 'void' in a list with the corresponding elements of a second list
|
||||
```
|
||||
using L1 = std::tuple<void, int, float, void, int>;
|
||||
using L2 = std::tuple<char[1], char[2], char[3], char[4], char[5]>;
|
||||
@@ -531,7 +531,7 @@ As `mp_max_element`, but takes a quoted metafunction.
|
||||
template<class L, class V> using mp_find = /*...*/;
|
||||
|
||||
`mp_find<L, V>` returns the index at which the type `V` is located in the list `L`. It's an alias for `mp_size_t<I>`,
|
||||
where `I` is the zero-based index of the first occurence of `V` in `L`. If `L` does not contain `V`, `mp_find<L, V>`
|
||||
where `I` is the zero-based index of the first occurrence of `V` in `L`. If `L` does not contain `V`, `mp_find<L, V>`
|
||||
is `mp_size<L>`.
|
||||
|
||||
## mp_find_if<L, P>
|
||||
|
||||
@@ -156,7 +156,7 @@ That is, when our `common_tuple` causes a substitution failure instead of a hard
|
||||
and `common_type_t`, which is defined as `typename common_type<...>::type`, will also cause a substitution failure.
|
||||
|
||||
As another example, consider the hypothetical type `expected<T, E...>` that represents either a successful return with a value of `T`,
|
||||
or an unsucessful return with an error code of some type in the list `E...`. The common type of `expected<T1, E1, E2, E3>` and
|
||||
or an unsuccessful return with an error code of some type in the list `E...`. The common type of `expected<T1, E1, E2, E3>` and
|
||||
`expected<T2, E1, E4, E5>` is `expected<common_type_t<T1, T2>, E1, E2, E3, E4, E5>`. That is, the possible return values are
|
||||
combined into their common type, and we take the union of the set of error types.
|
||||
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ replaces the existing element with `T`.
|
||||
If the map `M` does not contain an element with a key `mp_first<T>`, inserts it (using `mp_push_back<M, T>`); otherwise,
|
||||
replaces the existing element `L<X, Y...>` with `L<X, F<X, Y...>>`.
|
||||
|
||||
.Using mp_map_update to count the number of occurences of types in a list
|
||||
.Using mp_map_update to count the number of occurrences of types in a list
|
||||
```
|
||||
template<class T, class U> using inc2nd = mp_int<U::value + 1>;
|
||||
|
||||
|
||||
Reference in new issue
Block a user