1
0
forked from boostorg/mp11

Expand mp_for_each note slightly

This commit is contained in:
Peter Dimov
2021-03-04 20:15:30 +02:00
parent a0658d7797
commit 0dea2f1a2b

View File

@@ -907,7 +907,9 @@ template<class... T> void print( std::tuple<T...> const & tp )
} }
``` ```
In case the elements of the list `L` are not default-constructible, you can use `mp_for_each<mp_transform<mp_identity, L>>`. In case the elements of the list `L` are not default-constructible, you can use
`mp_for_each<mp_transform<mp_identity, L>>`, which would call `f` with `mp_identity<T>()`
instead of `T()`.
## mp_with_index<N>(i, f) ## mp_with_index<N>(i, f)