Wednesday, April 20, 2016

FeedaMail: Comments for Sutter’s Mill

feedamail.com Comments for Sutter's Mill

Comment on Trip report: Winter ISO C++ standards meeting by Adam H

By the way did you intend:

for_each(std::par, first, last, [](auto& x){ process(x); }) // with auto&

Read More »

Comment on Trip report: Winter ISO C++ standards meeting by Herb Sutter

@Adam: The best place to find some stories is to search for “trip reports” on isocpp.org, which often include stories and would give you specific people to contact individually to ask for more.

Yes, the auto& is intended. Because each parallel invocation is on a different element of the range, there’s no data race (assuming the elements don’t share state further down under the covers) and so no reason to copy the elements, plus this allows updating the element in-place and works with noncopyable types.

Read More »
 
Delievered to you by Feedamail.
Unsubscribe

No comments:

Post a Comment