Skip to content

Commit bd8dedd

Browse files
Deprecate thrust::null_type
1 parent 3421002 commit bd8dedd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

thrust/testing/tuple.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ DECLARE_UNITTEST(TestTupleCTAD);
529529
#endif // _CCCL_STD_VER >= 2017
530530

531531
// Ensure that we are backwards compatible with the old thrust::tuple implementation
532+
_CCCL_SUPPRESS_DEPRECATED_PUSH
532533
static_assert(
533534
thrust::tuple_size<thrust::tuple<thrust::null_type,
534535
thrust::null_type,
@@ -625,3 +626,4 @@ static_assert(
625626
static_assert(
626627
thrust::tuple_size<thrust::tuple<int, int, int, int, int, int, int, int, int, thrust::null_type>>::value == 9, "");
627628
static_assert(thrust::tuple_size<thrust::tuple<int, int, int, int, int, int, int, int, int, int>>::value == 10, "");
629+
_CCCL_SUPPRESS_DEPRECATED_POP

thrust/thrust/tuple.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
THRUST_NAMESPACE_BEGIN
4545

4646
// define null_type for backwards compatibility
47-
struct null_type
47+
struct CCCL_DEPRECATED_BECAUSE("Please remove null_type from parameters to tuple<...>") null_type
4848
{};
4949

5050
_CCCL_HOST_DEVICE inline bool operator==(const null_type&, const null_type&)
@@ -176,6 +176,7 @@ using _CUDA_VSTD::tie;
176176
THRUST_NAMESPACE_END
177177

178178
_LIBCUDACXX_BEGIN_NAMESPACE_STD
179+
_CCCL_SUPPRESS_DEPRECATED_PUSH
179180

180181
template <>
181182
struct tuple_size<tuple<THRUST_NS_QUALIFIER::null_type,
@@ -284,4 +285,5 @@ struct tuple_size<tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, THRUST_NS_QUALIFIER:
284285
: tuple_size<tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8>>
285286
{};
286287

288+
_CCCL_SUPPRESS_DEPRECATED_POP
287289
_LIBCUDACXX_END_NAMESPACE_STD

0 commit comments

Comments
 (0)