X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tbb%2Finclude%2Ftbb%2Fparallel_for_each.h;h=59200b1ebb1d33d8395abb817f3f7428a26b8aed;hb=4c96b4064a92f65beead3cb2453d727187bed40f;hp=e59ee76bf807c61139301ef085fef9e9de76e317;hpb=46ab0514ba58ee00183ff0584c7ea7c9e3d76494;p=casparcg diff --git a/tbb/include/tbb/parallel_for_each.h b/tbb/include/tbb/parallel_for_each.h index e59ee76bf..59200b1eb 100644 --- a/tbb/include/tbb/parallel_for_each.h +++ b/tbb/include/tbb/parallel_for_each.h @@ -43,7 +43,7 @@ namespace internal { parallel_for_each_body(const Function &_func) : my_func(_func) {} parallel_for_each_body(const parallel_for_each_body &_caller) : my_func(_caller.my_func) {} - void operator() ( typename std::iterator_traits::value_type& value ) const { + void operator() ( typename std::iterator_traits::reference value ) const { my_func(value); } }; @@ -55,18 +55,18 @@ namespace internal { //@{ //! Calls function f for all items from [first, last) interval using user-supplied context /** @ingroup algorithms */ +#if __TBB_TASK_GROUP_CONTEXT template void parallel_for_each(InputIterator first, InputIterator last, const Function& f, task_group_context &context) { internal::parallel_for_each_body body(f); - tbb::parallel_do (first, last, body, context); } +#endif /* __TBB_TASK_GROUP_CONTEXT */ //! Uses default context template void parallel_for_each(InputIterator first, InputIterator last, const Function& f) { internal::parallel_for_each_body body(f); - tbb::parallel_do (first, last, body); }