Skip to content

Commit 90baee6

Browse files
include/oneapi/dpl/pstl/glue_algorithm_ranges_impl.h - fix issue: Brick __brick_copy specialized by _ExecutionPolicy without std::decay_t
#2110
1 parent 578564d commit 90baee6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/oneapi/dpl/pstl/glue_algorithm_ranges_impl.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -794,11 +794,13 @@ template <typename _ExecutionPolicy, typename _Range1, typename _Range2>
794794
oneapi::dpl::__internal::__enable_if_execution_policy<_ExecutionPolicy>
795795
copy(_ExecutionPolicy&& __exec, _Range1&& __rng, _Range2&& __result)
796796
{
797+
using _DecayedExecutionPolicy = std::decay_t<_ExecutionPolicy>;
798+
797799
auto __dispatch_tag = oneapi::dpl::__ranges::__select_backend(__exec, __rng, __result);
798800

799801
oneapi::dpl::__internal::__ranges::__pattern_walk_n(
800802
__dispatch_tag, ::std::forward<_ExecutionPolicy>(__exec),
801-
oneapi::dpl::__internal::__brick_copy<decltype(__dispatch_tag), _ExecutionPolicy>{},
803+
oneapi::dpl::__internal::__brick_copy<decltype(__dispatch_tag), _DecayedExecutionPolicy>{},
802804
views::all_read(::std::forward<_Range1>(__rng)), views::all_write(::std::forward<_Range2>(__result)));
803805
}
804806

0 commit comments

Comments
 (0)