Skip to content

Commit 578564d

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/oneapi/dpl/pstl/glue_algorithm_impl.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,13 @@ template <class _ExecutionPolicy, class _ForwardIterator1, class _ForwardIterato
268268
oneapi::dpl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator2>
269269
copy(_ExecutionPolicy&& __exec, _ForwardIterator1 __first, _ForwardIterator1 __last, _ForwardIterator2 __result)
270270
{
271+
using _DecayedExecutionPolicy = std::decay_t<_ExecutionPolicy>;
272+
271273
auto __dispatch_tag = oneapi::dpl::__internal::__select_backend(__exec, __first, __result);
272274

273275
return oneapi::dpl::__internal::__pattern_walk2_brick(
274276
__dispatch_tag, ::std::forward<_ExecutionPolicy>(__exec), __first, __last, __result,
275-
oneapi::dpl::__internal::__brick_copy<decltype(__dispatch_tag), _ExecutionPolicy>{});
277+
oneapi::dpl::__internal::__brick_copy<decltype(__dispatch_tag), _DecayedExecutionPolicy>{});
276278
}
277279

278280
template <class _ExecutionPolicy, class _ForwardIterator1, class _Size, class _ForwardIterator2>

0 commit comments

Comments
 (0)