Skip to content

Commit

Permalink
[oneDPL][ranges] + std::invoke for ranges::for_each
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeDvorskiy committed Jun 17, 2024
1 parent 92a0aa1 commit ecf7eb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/oneapi/dpl/pstl/algorithm_ranges_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ __pattern_for_each_impl(_Tag __tag, _ExecutionPolicy&& __exec, _R&& __r, _Fun __
{
static_assert(__is_parallel_tag_v<_Tag> || typename _Tag::__is_vector{});

auto __f_1 = [__f, __proj](auto&& __val) { __f(__proj(__val));};
auto __f_1 = [__f, __proj](auto&& __val) { std::invoke(__f, std::invoke(__proj, __val));};

oneapi::dpl::__internal::__pattern_walk1(__tag, std::forward<_ExecutionPolicy>(__exec), std::ranges::begin(__r),
std::ranges::begin(__r) + __r.size(), __f_1);
Expand Down

0 comments on commit ecf7eb5

Please sign in to comment.