From 30b57e3fa390897a6c0f6d512096665d96e55c5d Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Tue, 14 Jan 2025 09:39:41 +0100 Subject: [PATCH] Deprecate thrust::null_type (#3367) --- thrust/testing/tuple.cu | 2 ++ thrust/thrust/tuple.h | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/thrust/testing/tuple.cu b/thrust/testing/tuple.cu index 4be47b1de81..cccffec0081 100644 --- a/thrust/testing/tuple.cu +++ b/thrust/testing/tuple.cu @@ -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>::value == 9, ""); static_assert(thrust::tuple_size>::value == 10, ""); +_CCCL_SUPPRESS_DEPRECATED_POP diff --git a/thrust/thrust/tuple.h b/thrust/thrust/tuple.h index f54e814baa6..ff57db3fd97 100644 --- a/thrust/thrust/tuple.h +++ b/thrust/thrust/tuple.h @@ -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; @@ -77,6 +79,8 @@ _CCCL_HOST_DEVICE inline bool operator>(const null_type&, const null_type&) return false; } +_CCCL_SUPPRESS_DEPRECATED_POP + /*! \addtogroup utility * \{ */ @@ -176,6 +180,7 @@ using _CUDA_VSTD::tie; THRUST_NAMESPACE_END _LIBCUDACXX_BEGIN_NAMESPACE_STD +_CCCL_SUPPRESS_DEPRECATED_PUSH template <> struct tuple_size> {}; +_CCCL_SUPPRESS_DEPRECATED_POP _LIBCUDACXX_END_NAMESPACE_STD