From 0dea2f1a2b3c1dd396053ddcba709f6f78d3b86a Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 4 Mar 2021 20:15:30 +0200 Subject: [PATCH] Expand mp_for_each note slightly --- doc/mp11/algorithm.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/mp11/algorithm.adoc b/doc/mp11/algorithm.adoc index ea9ec3b..26d5706 100644 --- a/doc/mp11/algorithm.adoc +++ b/doc/mp11/algorithm.adoc @@ -907,7 +907,9 @@ template void print( std::tuple const & tp ) } ``` -In case the elements of the list `L` are not default-constructible, you can use `mp_for_each>`. +In case the elements of the list `L` are not default-constructible, you can use +`mp_for_each>`, which would call `f` with `mp_identity()` +instead of `T()`. ## mp_with_index(i, f)