mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2024-03-22 13:30:58 +08:00
Merge pull request #755 from pepsiman/executionpolicy
P.3 Split execution policy and container
This commit is contained in:
commit
4d45c6bb1d
|
@ -501,7 +501,7 @@ Now, there is no explicit mention of the iteration mechanism, and the loop opera
|
||||||
Sometimes better still, use a named algorithm:
|
Sometimes better still, use a named algorithm:
|
||||||
|
|
||||||
for_each(v, [](int x) { /* do something with x */ });
|
for_each(v, [](int x) { /* do something with x */ });
|
||||||
for_each(parallel.v, [](int x) { /* do something with x */ });
|
for_each(par, v, [](int x) { /* do something with x */ });
|
||||||
|
|
||||||
The last variant makes it clear that we are not interested in the order in which the elements of `v` are handled.
|
The last variant makes it clear that we are not interested in the order in which the elements of `v` are handled.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user