Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport to 2.8: Deprecate thrust macros from type_deduction.h (#3501) #3511

Merged
merged 2 commits into from
Jan 30, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading