File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -377,6 +377,10 @@ <h1>For each</h1>
377
377
Unlike its sequential form, the parallel overload of < code > for_each</ code > does not return a copy of
378
378
its < code > Function</ code > parameter, since parallelization may not permit efficient state
379
379
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 > .
380
384
</ cxx-notes >
381
385
</ cxx-function >
382
386
@@ -442,8 +446,9 @@ <h1>For each</h1>
442
446
</ cxx-remarks >
443
447
444
448
< 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 > .
447
452
</ cxx-notes >
448
453
</ cxx-function >
449
454
</ cxx-section >
Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ <h1>Dynamic execution policy</h1>
172
172
< cxx-example >
173
173
< pre > std::vector<float> sort_me = ...
174
174
175
- std::execution_policy exec = std::seq;
175
+ using namespace std::experimental::parallel;
176
+ execution_policy exec = seq;
176
177
177
178
if(sort_me.size() > threshold)
178
179
{
You can’t perform that action at this time.
0 commit comments