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>
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 >
Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ <h1>Dynamic execution policy</h1>
172172 < cxx-example >
173173 < pre > std::vector<float> sort_me = ...
174174
175- std::execution_policy exec = std::seq;
175+ using namespace std::experimental::parallel;
176+ execution_policy exec = seq;
176177
177178if(sort_me.size() > threshold)
178179{
You can’t perform that action at this time.
0 commit comments