Skip to content

Commit

Permalink
Deprecate thrust macros from type_deduction.h (#3501) (#3511)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardmgruber authored Jan 30, 2025
1 parent 3f8c8d5 commit d19f342
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions thrust/thrust/detail/type_deduction.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@

/// \def THRUST_MVCAP(x)
/// \brief Capture `x` into a lambda by moving.
///
/// deprecated [Since 2.8]
#define THRUST_MVCAP(x) x = ::std::move(x)

/// \def THRUST_RETOF(invocable, ...)
/// \brief Expands to the type returned by invoking an instance of the invocable
/// type \a invocable with parameters of type \c __VA_ARGS__. Must
/// be called with 1 or fewer parameters to the invocable.
///
#define THRUST_RETOF(...) THRUST_PP_DISPATCH(THRUST_RETOF, __VA_ARGS__)
#define THRUST_RETOF1(C) decltype(::std::declval<C>()())
/// deprecated [Since 2.8]
#define THRUST_RETOF(...) THRUST_PP_DISPATCH(THRUST_RETOF, __VA_ARGS__)
/// deprecated [Since 2.8]
#define THRUST_RETOF1(C) decltype(::std::declval<C>()())
/// deprecated [Since 2.8]
#define THRUST_RETOF2(C, V) decltype(::std::declval<C>()(::std::declval<V>()))

/// \def THRUST_RETURNS(...)
Expand Down Expand Up @@ -88,6 +90,7 @@
} \
/**/
#else
/// deprecated [Since 2.8]
# define THRUST_DECLTYPE_RETURNS_WITH_SFINAE_CONDITION(condition, ...) \
noexcept(noexcept(__VA_ARGS__))->typename std::enable_if<condition, decltype(__VA_ARGS__)>::type \
{ \
Expand Down

0 comments on commit d19f342

Please sign in to comment.