diff --git a/thrust/thrust/async/copy.h b/thrust/thrust/async/copy.h index 1556ce6b662..8ef88b90810 100644 --- a/thrust/thrust/async/copy.h +++ b/thrust/thrust/async/copy.h @@ -72,46 +72,45 @@ using thrust::async::unimplemented::async_copy; struct copy_fn final { template - _CCCL_HOST static auto + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call(thrust::detail::execution_policy_base const& from_exec, thrust::detail::execution_policy_base const& to_exec, ForwardIt&& first, Sentinel&& last, OutputIt&& output) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_copy( + THRUST_RETURNS(async_copy( thrust::detail::derived_cast(thrust::detail::strip_const(from_exec)), thrust::detail::derived_cast(thrust::detail::strip_const(to_exec)), THRUST_FWD(first), THRUST_FWD(last), - THRUST_FWD(output))) - - template - _CCCL_HOST static auto call(thrust::detail::execution_policy_base const& exec, - ForwardIt&& first, - Sentinel&& last, - OutputIt&& output) - THRUST_RETURNS(copy_fn::call( - thrust::detail::derived_cast(thrust::detail::strip_const(exec)) - // Synthesize a suitable new execution policy, because we don't want to - // try and extract twice from the one we were passed. - , - typename remove_cvref_t::tag_type{}, + THRUST_FWD(output))) _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST static auto call(thrust::detail::execution_policy_base const& exec, + ForwardIt&& first, + Sentinel&& last, + OutputIt&& output) + THRUST_RETURNS(copy_fn::call( + thrust::detail::derived_cast(thrust::detail::strip_const(exec)) + // Synthesize a suitable new execution policy, because we don't want to + // try and extract twice from the one we were passed. + , + typename remove_cvref_t::tag_type{}, + THRUST_FWD(first), + THRUST_FWD(last), + THRUST_FWD(output))) + + template + _CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, OutputIt&& output) THRUST_RETURNS(copy_fn::call( + thrust::detail::select_system(typename thrust::iterator_system>::type{}), + thrust::detail::select_system(typename thrust::iterator_system>::type{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(output))) - template - _CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, OutputIt&& output) - THRUST_RETURNS(copy_fn::call( - thrust::detail::select_system(typename thrust::iterator_system>::type{}), - thrust::detail::select_system(typename thrust::iterator_system>::type{}), - THRUST_FWD(first), - THRUST_FWD(last), - THRUST_FWD(output))) - - template - CCCL_DEPRECATED _CCCL_NODISCARD _CCCL_HOST auto operator()(Args&&... args) const + template + CCCL_DEPRECATED _CCCL_NODISCARD _CCCL_HOST auto operator()(Args&&... args) const THRUST_RETURNS(call(THRUST_FWD(args)...)) }; diff --git a/thrust/thrust/async/for_each.h b/thrust/thrust/async/for_each.h index b3ff1a4c0ab..6982edefd25 100644 --- a/thrust/thrust/async/for_each.h +++ b/thrust/thrust/async/for_each.h @@ -68,28 +68,26 @@ using thrust::async::unimplemented::async_for_each; struct for_each_fn final { template - _CCCL_HOST static auto + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call(thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, UnaryFunction&& f) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_for_each( - thrust::detail::derived_cast(thrust::detail::strip_const(exec)), + THRUST_RETURNS(async_for_each(thrust::detail::derived_cast(thrust::detail::strip_const(exec)), + THRUST_FWD(first), + THRUST_FWD(last), + THRUST_FWD(f))) _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, UnaryFunction&& f) THRUST_RETURNS(for_each_fn::call( + thrust::detail::select_system(typename iterator_system>::type{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(f))) - template - _CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, UnaryFunction&& f) - THRUST_RETURNS(for_each_fn::call( - thrust::detail::select_system(typename iterator_system>::type{}), - THRUST_FWD(first), - THRUST_FWD(last), - THRUST_FWD(f))) - - template - CCCL_DEPRECATED _CCCL_NODISCARD _CCCL_HOST auto operator()(Args&&... args) const + template + CCCL_DEPRECATED _CCCL_NODISCARD _CCCL_HOST auto operator()(Args&&... args) const THRUST_RETURNS(call(THRUST_FWD(args)...)) }; diff --git a/thrust/thrust/async/reduce.h b/thrust/thrust/async/reduce.h index add2a4fc53c..832300cbebd 100644 --- a/thrust/thrust/async/reduce.h +++ b/thrust/thrust/async/reduce.h @@ -70,65 +70,67 @@ using thrust::async::unimplemented::async_reduce; struct reduce_fn final { template - _CCCL_HOST static auto + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call(thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, T&& init, BinaryOp&& op) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_reduce( + THRUST_RETURNS(async_reduce( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(init), - THRUST_FWD(op))) - - template - _CCCL_HOST static auto call4( - thrust::detail::execution_policy_base const& exec, - ForwardIt&& first, - Sentinel&& last, - T&& init, - thrust::true_type) + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH + static auto call4(thrust::detail::execution_policy_base const& exec, + ForwardIt&& first, + Sentinel&& last, + T&& init, + thrust::true_type) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_reduce( + THRUST_RETURNS(async_reduce( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(init), - thrust::plus>{})) - - template - _CCCL_HOST static auto call3(thrust::detail::execution_policy_base const& exec, - ForwardIt&& first, - Sentinel&& last, - thrust::true_type) + thrust::plus>{})) _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH + static auto call3(thrust::detail::execution_policy_base const& exec, + ForwardIt&& first, + Sentinel&& last, + thrust::true_type) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_reduce( + THRUST_RETURNS(async_reduce( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), typename iterator_traits>::value_type{}, thrust::plus>::value_type>>{})) - - template - _CCCL_HOST static auto call4(ForwardIt&& first, Sentinel&& last, T&& init, BinaryOp&& op, thrust::false_type) - THRUST_RETURNS(reduce_fn::call( - thrust::detail::select_system(typename iterator_system>::type{}), - THRUST_FWD(first), - THRUST_FWD(last), - THRUST_FWD(init), - THRUST_FWD(op))) - - template - _CCCL_HOST static auto call3(ForwardIt&& first, Sentinel&& last, T&& init, thrust::false_type) - THRUST_RETURNS(reduce_fn::call( - thrust::detail::select_system(typename iterator_system>::type{}), - THRUST_FWD(first), - THRUST_FWD(last), - THRUST_FWD(init), - thrust::plus>{})) + _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST static auto call4(ForwardIt&& first, Sentinel&& last, T&& init, BinaryOp&& op, thrust::false_type) + THRUST_RETURNS(reduce_fn::call( + thrust::detail::select_system(typename iterator_system>::type{}), + THRUST_FWD(first), + THRUST_FWD(last), + THRUST_FWD(init), + THRUST_FWD(op))) + + template + _CCCL_HOST static auto call3(ForwardIt&& first, Sentinel&& last, T&& init, thrust::false_type) + THRUST_RETURNS(reduce_fn::call( + thrust::detail::select_system(typename iterator_system>::type{}), + THRUST_FWD(first), + THRUST_FWD(last), + THRUST_FWD(init), + thrust::plus>{})) // MSVC WAR: MSVC gets angsty and eats all available RAM when we try to detect // if T1 is an execution_policy by using SFINAE. Switching to a static @@ -189,7 +191,7 @@ using thrust::async::unimplemented::async_reduce_into; struct reduce_into_fn final { template - _CCCL_HOST static auto + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call(thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, @@ -197,81 +199,81 @@ struct reduce_into_fn final T&& init, BinaryOp&& op) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_reduce_into( + THRUST_RETURNS(async_reduce_into( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(output), THRUST_FWD(init), - THRUST_FWD(op))) - - template - _CCCL_HOST static auto call5( - thrust::detail::execution_policy_base const& exec, - ForwardIt&& first, - Sentinel&& last, - OutputIt&& output, - T&& init, - thrust::true_type) + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call5( + thrust::detail::execution_policy_base const& exec, + ForwardIt&& first, + Sentinel&& last, + OutputIt&& output, + T&& init, + thrust::true_type) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_reduce_into( + THRUST_RETURNS(async_reduce_into( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(output), THRUST_FWD(init), - thrust::plus>{})) - - template - _CCCL_HOST static auto call4( - thrust::detail::execution_policy_base const& exec, - ForwardIt&& first, - Sentinel&& last, - OutputIt&& output, - thrust::true_type) + thrust::plus>{})) _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST _CCCL_SUPPRESS_DEPRECATED_PUSH + static auto call4(thrust::detail::execution_policy_base const& exec, + ForwardIt&& first, + Sentinel&& last, + OutputIt&& output, + thrust::true_type) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_reduce_into( + THRUST_RETURNS(async_reduce_into( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(output), typename iterator_traits>::value_type{}, thrust::plus>::value_type>>{})) - - template - _CCCL_HOST static auto call5( - ForwardIt&& first, Sentinel&& last, OutputIt&& output, T&& init, BinaryOp&& op, thrust::false_type) - THRUST_RETURNS(reduce_into_fn::call( - thrust::detail::select_system(typename iterator_system>::type{}, - typename iterator_system>::type{}), - THRUST_FWD(first), - THRUST_FWD(last), - THRUST_FWD(output), - THRUST_FWD(init), - THRUST_FWD(op))) - - template - _CCCL_HOST static auto call4( - ForwardIt&& first, Sentinel&& last, OutputIt&& output, T&& init, thrust::false_type) - THRUST_RETURNS(reduce_into_fn::call( - thrust::detail::select_system(typename iterator_system>::type{}, - typename iterator_system>::type{}), - THRUST_FWD(first), - THRUST_FWD(last), - THRUST_FWD(output), - THRUST_FWD(init), - thrust::plus>{})) - - template - _CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, OutputIt&& output) - THRUST_RETURNS(reduce_into_fn::call( - thrust::detail::select_system(typename iterator_system>::type{}, - typename iterator_system>::type{}), - THRUST_FWD(first), - THRUST_FWD(last), - THRUST_FWD(output), - typename iterator_traits>::value_type{}, - thrust::plus>::value_type>>{})) + _CCCL_SUPPRESS_DEPRECATED_POP + + template + _CCCL_HOST static auto call5( + ForwardIt&& first, Sentinel&& last, OutputIt&& output, T&& init, BinaryOp&& op, thrust::false_type) + THRUST_RETURNS(reduce_into_fn::call( + thrust::detail::select_system(typename iterator_system>::type{}, + typename iterator_system>::type{}), + THRUST_FWD(first), + THRUST_FWD(last), + THRUST_FWD(output), + THRUST_FWD(init), + THRUST_FWD(op))) + + template + _CCCL_HOST static auto call4(ForwardIt&& first, Sentinel&& last, OutputIt&& output, T&& init, thrust::false_type) + THRUST_RETURNS(reduce_into_fn::call( + thrust::detail::select_system(typename iterator_system>::type{}, + typename iterator_system>::type{}), + THRUST_FWD(first), + THRUST_FWD(last), + THRUST_FWD(output), + THRUST_FWD(init), + thrust::plus>{})) + + template + _CCCL_HOST static auto call(ForwardIt&& first, Sentinel&& last, OutputIt&& output) + THRUST_RETURNS(reduce_into_fn::call( + thrust::detail::select_system(typename iterator_system>::type{}, + typename iterator_system>::type{}), + THRUST_FWD(first), + THRUST_FWD(last), + THRUST_FWD(output), + typename iterator_traits>::value_type{}, + thrust::plus>::value_type>>{})) // MSVC WAR: MSVC gets angsty and eats all available RAM when we try to detect // if T1 is an execution_policy by using SFINAE. Switching to a static diff --git a/thrust/thrust/async/scan.h b/thrust/thrust/async/scan.h index f5840d112fe..3c4d9c1dd81 100644 --- a/thrust/thrust/async/scan.h +++ b/thrust/thrust/async/scan.h @@ -85,99 +85,101 @@ using thrust::async::unimplemented::async_inclusive_scan; struct inclusive_scan_fn final { template - CCCL_DEPRECATED auto operator()( + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()( thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, OutputIt&& out, BinaryOp&& op) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_inclusive_scan( + THRUST_RETURNS(async_inclusive_scan( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), - THRUST_FWD(op))) + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP - template - CCCL_DEPRECATED + template + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()(thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, OutputIt&& out) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_inclusive_scan( + THRUST_RETURNS(async_inclusive_scan( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), - thrust::plus<>{})) - - template - CCCL_DEPRECATED - auto operator()(thrust::detail::execution_policy_base const& exec, - ForwardIt&& first, - Sentinel&& last, - OutputIt&& out, - InitialValueType&& init, - BinaryOp&& op) const + thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_PUSH + + template + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()( + thrust::detail::execution_policy_base const& exec, + ForwardIt&& first, + Sentinel&& last, + OutputIt&& out, + InitialValueType&& init, + BinaryOp&& op) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_inclusive_scan( + THRUST_RETURNS(async_inclusive_scan( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), THRUST_FWD(init), - THRUST_FWD(op))) - - template >>> - CCCL_DEPRECATED auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, BinaryOp&& op) const + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP + + template >>> + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH + auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, BinaryOp&& op) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_inclusive_scan( + THRUST_RETURNS(async_inclusive_scan( thrust::detail::select_system(iterator_system_t>{}, iterator_system_t>{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), - THRUST_FWD(op))) + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP - template - CCCL_DEPRECATED auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out) const + template + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH + auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_inclusive_scan( + THRUST_RETURNS(async_inclusive_scan( thrust::detail::select_system(iterator_system_t>{}, iterator_system_t>{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), - thrust::plus<>{})) - - template >>> - CCCL_DEPRECATED + thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_POP + + template >>> + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init, BinaryOp&& op) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_inclusive_scan( + THRUST_RETURNS(async_inclusive_scan( thrust::detail::select_system(iterator_system_t>{}, iterator_system_t>{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), THRUST_FWD(init), - THRUST_FWD(op))) + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP }; } // namespace inclusive_scan_detail @@ -202,7 +204,7 @@ struct exclusive_scan_fn final typename OutputIt, typename InitialValueType, typename BinaryOp> - CCCL_DEPRECATED auto operator()( + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()( thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, @@ -210,90 +212,92 @@ struct exclusive_scan_fn final InitialValueType&& init, BinaryOp&& op) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_exclusive_scan( + THRUST_RETURNS(async_exclusive_scan( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), THRUST_FWD(init), - THRUST_FWD(op))) + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP - template - CCCL_DEPRECATED + template + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()(thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_exclusive_scan( + THRUST_RETURNS(async_exclusive_scan( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), THRUST_FWD(init), - thrust::plus<>{})) + thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_POP - template - CCCL_DEPRECATED + template + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()(thrust::detail::execution_policy_base const& exec, ForwardIt&& first, Sentinel&& last, OutputIt&& out) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_exclusive_scan( + THRUST_RETURNS(async_exclusive_scan( thrust::detail::derived_cast(thrust::detail::strip_const(exec)), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), iterator_value_t>{}, - thrust::plus<>{})) - - template >>> - CCCL_DEPRECATED + thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_POP + + template >>> + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init, BinaryOp&& op) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_exclusive_scan( + THRUST_RETURNS(async_exclusive_scan( thrust::detail::select_system(iterator_system_t>{}, iterator_system_t>{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), THRUST_FWD(init), - THRUST_FWD(op))) - - template >>> - CCCL_DEPRECATED auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init) const + THRUST_FWD(op))) _CCCL_SUPPRESS_DEPRECATED_POP + + template >>> + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH + auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out, InitialValueType&& init) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_exclusive_scan( + THRUST_RETURNS(async_exclusive_scan( thrust::detail::select_system(iterator_system_t>{}, iterator_system_t>{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), THRUST_FWD(init), - thrust::plus<>{})) + thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_POP - template - CCCL_DEPRECATED auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out) const + template + CCCL_DEPRECATED _CCCL_SUPPRESS_DEPRECATED_PUSH + auto operator()(ForwardIt&& first, Sentinel&& last, OutputIt&& out) const // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(async_exclusive_scan( + THRUST_RETURNS(async_exclusive_scan( thrust::detail::select_system(iterator_system_t>{}, iterator_system_t>{}), THRUST_FWD(first), THRUST_FWD(last), THRUST_FWD(out), iterator_value_t>{}, - thrust::plus<>{})) + thrust::plus<>{})) _CCCL_SUPPRESS_DEPRECATED_POP }; } // namespace exclusive_scan_detail diff --git a/thrust/thrust/async/sort.h b/thrust/thrust/async/sort.h index 6b69a6784a1..93dec88f330 100644 --- a/thrust/thrust/async/sort.h +++ b/thrust/thrust/async/sort.h @@ -75,31 +75,34 @@ struct stable_sort_fn final , typename ForwardIt, typename Sentinel, typename StrictWeakOrdering > _CCCL_HOST + _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call( thrust::detail::execution_policy_base const& exec , ForwardIt&& first, Sentinel&& last , StrictWeakOrdering&& comp ) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS( + THRUST_RETURNS( async_stable_sort( thrust::detail::derived_cast(thrust::detail::strip_const(exec)) , THRUST_FWD(first), THRUST_FWD(last) , THRUST_FWD(comp) ) ) + _CCCL_SUPPRESS_DEPRECATED_POP template < typename DerivedPolicy , typename ForwardIt, typename Sentinel > _CCCL_HOST + _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call( thrust::detail::execution_policy_base const& exec , ForwardIt&& first, Sentinel&& last ) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS( + THRUST_RETURNS( async_stable_sort( thrust::detail::derived_cast(thrust::detail::strip_const(exec)) , THRUST_FWD(first), THRUST_FWD(last) @@ -108,6 +111,7 @@ struct stable_sort_fn final >{} ) ) + _CCCL_SUPPRESS_DEPRECATED_POP template _CCCL_HOST @@ -170,6 +174,7 @@ using thrust::async::fallback::async_sort; // clang-format off struct sort_fn final { + _CCCL_SUPPRESS_DEPRECATED_PUSH template < typename DerivedPolicy , typename ForwardIt, typename Sentinel, typename StrictWeakOrdering @@ -181,13 +186,14 @@ struct sort_fn final , StrictWeakOrdering&& comp ) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS( + THRUST_RETURNS( async_sort( thrust::detail::derived_cast(thrust::detail::strip_const(exec)) , THRUST_FWD(first), THRUST_FWD(last) , THRUST_FWD(comp) ) ) + _CCCL_SUPPRESS_DEPRECATED_POP template < typename DerivedPolicy diff --git a/thrust/thrust/async/transform.h b/thrust/thrust/async/transform.h index fd6d8e3d3ed..5cca6c04fe1 100644 --- a/thrust/thrust/async/transform.h +++ b/thrust/thrust/async/transform.h @@ -74,6 +74,7 @@ struct transform_fn final , typename UnaryOperation > _CCCL_HOST + _CCCL_SUPPRESS_DEPRECATED_PUSH static auto call( thrust::detail::execution_policy_base const& exec @@ -82,7 +83,7 @@ struct transform_fn final , UnaryOperation&& op ) // ADL dispatch. - _THRUST_RETURNS_SUPPRESS_DEPRECATIONS( + THRUST_RETURNS( async_transform( thrust::detail::derived_cast(thrust::detail::strip_const(exec)) , THRUST_FWD(first), THRUST_FWD(last) @@ -90,6 +91,7 @@ struct transform_fn final , THRUST_FWD(op) ) ) + _CCCL_SUPPRESS_DEPRECATED_POP template < typename ForwardIt, typename Sentinel, typename OutputIt diff --git a/thrust/thrust/detail/type_deduction.h b/thrust/thrust/detail/type_deduction.h index e445d75720d..a1d41de9676 100644 --- a/thrust/thrust/detail/type_deduction.h +++ b/thrust/thrust/detail/type_deduction.h @@ -53,14 +53,6 @@ } \ /**/ -#define _THRUST_RETURNS_SUPPRESS_DEPRECATIONS(...) \ - _CCCL_SUPPRESS_DEPRECATED_PUSH noexcept(noexcept(__VA_ARGS__)) _CCCL_SUPPRESS_DEPRECATED_POP \ - { \ - _CCCL_SUPPRESS_DEPRECATED_PUSH \ - return (__VA_ARGS__); \ - _CCCL_SUPPRESS_DEPRECATED_POP \ - } - /// \def THRUST_DECLTYPE_RETURNS(...) /// \brief Expands to a function definition, including a trailing returning /// type, that returns the expression \c __VA_ARGS__.