Skip to content

Commit 76f01dc

Browse files
committed
Provide more clarity on the parallel form of for_each & for_each_n's requirements on Function, per Lukasz' comment on n3554/n3554#54
1 parent 6c5e3b2 commit 76f01dc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

algorithms.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ <h1>For each</h1>
377377
Unlike its sequential form, the parallel overload of <code>for_each</code> does not return a copy of
378378
its <code>Function</code> parameter, since parallelization may not permit efficient state
379379
accumulation.
380+
381+
Unlike its sequential form, the parallel overload of <code>for_each</code> requires
382+
<code>Function</code> to meet the requirements of <code>CopyConstructible</code>, but not
383+
<code>MoveConstructible</code>.
380384
</cxx-notes>
381385
</cxx-function>
382386

@@ -442,8 +446,9 @@ <h1>For each</h1>
442446
</cxx-remarks>
443447

444448
<cxx-notes>
445-
Unlike its sequential form, the parallel overload of <code>for_each_n</code> does not require
446-
<code>Function</code> to meet the requirements of <code>MoveConstructible</code>.
449+
Unlike its sequential form, the parallel overload of <code>for_each_n</code> requires
450+
<code>Function</code> to meet the requirements of <code>CopyConstructible</code>, but not
451+
<code>MoveConstructible</code>.
447452
</cxx-notes>
448453
</cxx-function>
449454
</cxx-section>

0 commit comments

Comments
 (0)