Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions thrust/testing/tuple.cu
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ DECLARE_UNITTEST(TestTupleCTAD);
#endif // _CCCL_STD_VER >= 2017

// Ensure that we are backwards compatible with the old thrust::tuple implementation
_CCCL_SUPPRESS_DEPRECATED_PUSH
static_assert(
thrust::tuple_size<thrust::tuple<thrust::null_type,
thrust::null_type,
Expand Down Expand Up @@ -625,3 +626,4 @@ static_assert(
static_assert(
thrust::tuple_size<thrust::tuple<int, int, int, int, int, int, int, int, int, thrust::null_type>>::value == 9, "");
static_assert(thrust::tuple_size<thrust::tuple<int, int, int, int, int, int, int, int, int, int>>::value == 10, "");
_CCCL_SUPPRESS_DEPRECATED_POP
8 changes: 7 additions & 1 deletion thrust/thrust/tuple.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@
THRUST_NAMESPACE_BEGIN

// define null_type for backwards compatibility
struct null_type
struct CCCL_DEPRECATED_BECAUSE("Please remove null_type from parameters to tuple<...>") null_type
{};

_CCCL_SUPPRESS_DEPRECATED_PUSH

_CCCL_HOST_DEVICE inline bool operator==(const null_type&, const null_type&)
{
return true;
Expand Down Expand Up @@ -77,6 +79,8 @@ _CCCL_HOST_DEVICE inline bool operator>(const null_type&, const null_type&)
return false;
}

_CCCL_SUPPRESS_DEPRECATED_POP

/*! \addtogroup utility
* \{
*/
Expand Down Expand Up @@ -176,6 +180,7 @@ using _CUDA_VSTD::tie;
THRUST_NAMESPACE_END

_LIBCUDACXX_BEGIN_NAMESPACE_STD
_CCCL_SUPPRESS_DEPRECATED_PUSH

template <>
struct tuple_size<tuple<THRUST_NS_QUALIFIER::null_type,
Expand Down Expand Up @@ -284,4 +289,5 @@ struct tuple_size<tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, THRUST_NS_QUALIFIER:
: tuple_size<tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8>>
{};

_CCCL_SUPPRESS_DEPRECATED_POP
_LIBCUDACXX_END_NAMESPACE_STD
Loading