Skip to content

Commit 9897952

Browse files
committed
Merge pull request #4 from jaredhoberock/master
Fixes to recent issues
2 parents c9b6640 + 76f01dc commit 9897952

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
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>

execution_policies.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ <h1>Dynamic execution policy</h1>
172172
<cxx-example>
173173
<pre>std::vector&lt;float&gt; sort_me = ...
174174

175-
std::execution_policy exec = std::seq;
175+
using namespace std::experimental::parallel;
176+
execution_policy exec = seq;
176177

177178
if(sort_me.size() &gt; threshold)
178179
{

0 commit comments

Comments
 (0)