Skip to content

Commit

Permalink
Cleanup diagnostic handling (#1420)
Browse files Browse the repository at this point in the history
* Cleanup diagnostic handling

Consistently use `_CCCL_DIAG_SUPPRESS_DEPRECATED_{PUSH|POP}`

Also shorten it to `_CCCL_SUPPRESS_DEPRECATED_{PUSH|POP}`

* Move macro definition to where it is used first

* bring back deleted warning
  • Loading branch information
miscco committed Feb 29, 2024
1 parent 1acc6aa commit 13025d9
Show file tree
Hide file tree
Showing 41 changed files with 103 additions and 181 deletions.
4 changes: 2 additions & 2 deletions cub/cub/agent/agent_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
#include <cub/iterator/cache_modified_input_iterator.cuh>
#include <cub/util_type.cuh>

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH
#include <cuda/std/functional>
_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

CUB_NAMESPACE_BEGIN

Expand Down
4 changes: 2 additions & 2 deletions cub/cub/detail/type_traits.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
#include <cub/util_cpp_dialect.cuh>
#include <cub/util_namespace.cuh>

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH
#include <cuda/std/functional>
_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP
#include <cuda/std/type_traits>

CUB_NAMESPACE_BEGIN
Expand Down
11 changes: 3 additions & 8 deletions cub/cub/device/dispatch/dispatch_radix_sort.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@

// suppress warnings triggered by #pragma unroll:
// "warning: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]"
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpass-failed"
#endif
_CCCL_DIAG_PUSH
_CCCL_DIAG_SUPPRESS_CLANG("-Wpass-failed")

CUB_NAMESPACE_BEGIN

Expand Down Expand Up @@ -2987,7 +2985,4 @@ struct DispatchSegmentedRadixSort : SelectedPolicy

CUB_NAMESPACE_END


#if defined(__clang__)
# pragma clang diagnostic pop
#endif
_CCCL_DIAG_POP
4 changes: 2 additions & 2 deletions cub/cub/device/dispatch/dispatch_reduce.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@

#include <iterator>

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH
#include <cuda/std/functional>
_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions cub/cub/thread/thread_operators.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
#include <cub/util_cpp_dialect.cuh>
#include <cub/util_type.cuh>

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH
#include <cuda/std/functional>
_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP
#include <cuda/std/type_traits>
#include <cuda/std/utility>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,25 @@

// Convenient shortcuts to silence common warnings
#if defined(_CCCL_COMPILER_CLANG)
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH \
# define _CCCL_SUPPRESS_DEPRECATED_PUSH \
_CCCL_DIAG_PUSH \
_CCCL_DIAG_SUPPRESS_CLANG("-Wdeprecated") \
_CCCL_DIAG_SUPPRESS_CLANG("-Wdeprecated-declarations")
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP
#elif defined(_CCCL_COMPILER_GCC)
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH \
# define _CCCL_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP
#elif defined(_CCCL_COMPILER_GCC) || defined(_CCCL_COMPILER_ICC)
# define _CCCL_SUPPRESS_DEPRECATED_PUSH \
_CCCL_DIAG_PUSH \
_CCCL_DIAG_SUPPRESS_GCC("-Wdeprecated") \
_CCCL_DIAG_SUPPRESS_GCC("-Wdeprecated-declarations")
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP
# define _CCCL_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP
#elif defined(_CCCL_COMPILER_MSVC)
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH \
# define _CCCL_SUPPRESS_DEPRECATED_PUSH \
_CCCL_DIAG_PUSH \
_CCCL_DIAG_SUPPRESS_MSVC(4996)
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP
# define _CCCL_SUPPRESS_DEPRECATED_POP _CCCL_DIAG_POP
#else // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER_GCC
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
# define _CCCL_DIAG_SUPPRESS_DEPRECATED_POP
# define _CCCL_SUPPRESS_DEPRECATED_PUSH
# define _CCCL_SUPPRESS_DEPRECATED_POP
#endif // !_CCCL_COMPILER_CLANG && !_CCCL_COMPILER_GCC

// Enable us to selectively silence cuda compiler warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ concept convertible_to =

#elif _CCCL_STD_VER >= 2014 // ^^^ C++20 ^^^ / vvv C++14/17 vvv

#if defined(_CCCL_COMPILER_MSVC)
#if defined(_LIBCUDACXX_COMPILER_MSVC)
_CCCL_NV_DIAG_SUPPRESS(1211) // nonstandard cast to array type ignored
#endif // _CCCL_COMPILER_MSVC
#endif // _LIBCUDACXX_COMPILER_MSVC
_CCCL_NV_DIAG_SUPPRESS(171) // invalid type conversion, e.g. [with _From=int **, _To=const int *const *]

// We cannot put this conversion check with the other constraint, as types with deleted operator will break here
Expand All @@ -68,9 +68,9 @@ _LIBCUDACXX_CONCEPT_FRAGMENT(
template<class _From, class _To>
_LIBCUDACXX_CONCEPT convertible_to = _LIBCUDACXX_FRAGMENT(__convertible_to_, _From, _To);

#if defined(_CCCL_COMPILER_MSVC)
#if defined(_LIBCUDACXX_COMPILER_MSVC)
_CCCL_NV_DIAG_DEFAULT(1211) // nonstandard cast to array type ignored
#endif // _CCCL_COMPILER_MSVC
#endif // _LIBCUDACXX_COMPILER_MSVC
_CCCL_NV_DIAG_DEFAULT(171) // invalid type conversion, e.g. [with _From=int **, _To=const int *const *]

#endif // _CCCL_STD_VER >= 2014
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
#include "../__utility/forward.h"
#include "../__utility/move.h"

#if defined(_CCCL_COMPILER_MSVC)
_LIBCUDACXX_NV_DIAG_SUPPRESS(461) // nonstandard cast to array type ignored
#endif // _CCCL_COMPILER_MSVC
#if defined(_LIBCUDACXX_COMPILER_MSVC)
_CCCL_NV_DIAG_SUPPRESS(461) // nonstandard cast to array type ignored
#endif // _LIBCUDACXX_COMPILER_MSVC

#if _CCCL_STD_VER > 2011

Expand Down Expand Up @@ -97,15 +97,15 @@ _LIBCUDACXX_BEGIN_NAMESPACE_CPO(__swap)
#if _CCCL_STD_VER > 2017 && !defined(_CCCL_COMPILER_NVHPC) // nvbug4051640
struct __fn;

_LIBCUDACXX_NV_DIAG_SUPPRESS(2642)
_CCCL_NV_DIAG_SUPPRESS(2642)
template<class _Tp, class _Up, size_t _Size>
concept __swappable_arrays =
!__unqualified_swappable_with<_Tp(&)[_Size], _Up(&)[_Size]> &&
extent_v<_Tp> == extent_v<_Up> &&
requires(_Tp(& __t)[_Size], _Up(& __u)[_Size], const __fn& __swap) {
__swap(__t[0], __u[0]);
};
_LIBCUDACXX_NV_DIAG_DEFAULT(2642)
_CCCL_NV_DIAG_DEFAULT(2642)

#else
template<class _Tp, class _Up, size_t _Size, class = void>
Expand Down Expand Up @@ -220,9 +220,9 @@ _LIBCUDACXX_END_NAMESPACE_STD

#endif // _CCCL_STD_VER > 2011

#if defined(_CCCL_COMPILER_MSVC)
_LIBCUDACXX_NV_DIAG_DEFAULT(461) // nonstandard cast to array type ignored
#endif // _CCCL_COMPILER_MSVC
#if defined(_LIBCUDACXX_COMPILER_MSVC)
_CCCL_NV_DIAG_DEFAULT(461) // nonstandard cast to array type ignored
#endif // _LIBCUDACXX_COMPILER_MSVC


#endif // _LIBCUDACXX___CONCEPTS_SWAPPABLE_H
51 changes: 3 additions & 48 deletions libcudacxx/include/cuda/std/detail/libcxx/include/__config
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ extern "C++" {
# define _ALIGNAS(x) __attribute__((__aligned__(x)))
#endif // !_CCCL_COMPILER_MSVC && !__has_feature(cxx_alignas)

#define _LIBCUDACXX_TOSTRING2(_STR) #_STR
#define _LIBCUDACXX_TOSTRING(_STR) _LIBCUDACXX_TOSTRING2(_STR)

// This is wrapped in __CUDA_ARCH__ to prevent error: "ignoring '#pragma unroll'
// [-Werror=unknown-pragmas]"
#if defined(__CUDA_ARCH__)
Expand Down Expand Up @@ -851,41 +854,6 @@ extern "C++" {
#define _LIBCUDACXX_UNDERLYING_TYPE(...) __underlying_type(__VA_ARGS__)
#endif // __check_builtin(underlying_type)

#define _LIBCUDACXX_TOSTRING2(_STR) #_STR
#define _LIBCUDACXX_TOSTRING(_STR) _LIBCUDACXX_TOSTRING2(_STR)
#if defined(_LIBCUDACXX_CUDACC) && !defined(_CCCL_CUDA_COMPILER_CLANG)
# if defined(__NVCC_DIAG_PRAGMA_SUPPORT__)
# if defined(_CCCL_COMPILER_MSVC)
# define _LIBCUDACXX_NV_DIAG_SUPPRESS(_WARNING) __pragma(_LIBCUDACXX_TOSTRING(nv_diag_suppress _WARNING))
# define _LIBCUDACXX_NV_DIAG_DEFAULT(_WARNING) __pragma(_LIBCUDACXX_TOSTRING(nv_diag_default _WARNING))
# else // ^^^ MSVC ^^^ / vvv not MSVC
# define _LIBCUDACXX_NV_DIAG_SUPPRESS(_WARNING) \
_Pragma(_LIBCUDACXX_TOSTRING(nv_diagnostic push)) \
_Pragma(_LIBCUDACXX_TOSTRING(nv_diag_suppress _WARNING))
# define _LIBCUDACXX_NV_DIAG_DEFAULT(_WARNING) _Pragma(_LIBCUDACXX_TOSTRING(nv_diagnostic pop))
# endif // not MSVC
# elif defined(_CCCL_COMPILER_NVHPC)
# define _LIBCUDACXX_NV_DIAG_SUPPRESS(_WARNING) \
_Pragma(_LIBCUDACXX_TOSTRING(diagnostic push)) \
_Pragma(_LIBCUDACXX_TOSTRING(diag_suppress _WARNING))
# define _LIBCUDACXX_NV_DIAG_DEFAULT(_WARNING) _Pragma(_LIBCUDACXX_TOSTRING(diagnostic pop))
# else // _LIBCUDACXX_CUDACC_BELOW_11_3
# if defined(_CCCL_COMPILER_MSVC_2017) // MSVC 2017 has issues with restoring the warning
# define _LIBCUDACXX_NV_DIAG_SUPPRESS(_WARNING) __pragma(_LIBCUDACXX_TOSTRING(diag_suppress _WARNING))
# define _LIBCUDACXX_NV_DIAG_DEFAULT(_WARNING)
# elif defined(_CCCL_COMPILER_MSVC)
# define _LIBCUDACXX_NV_DIAG_SUPPRESS(_WARNING) __pragma(_LIBCUDACXX_TOSTRING(diag_suppress _WARNING))
# define _LIBCUDACXX_NV_DIAG_DEFAULT(_WARNING) __pragma(_LIBCUDACXX_TOSTRING(diag_default _WARNING))
# else // ^^^ MSVC ^^^ / vvv not MSVC
# define _LIBCUDACXX_NV_DIAG_SUPPRESS(_WARNING) _Pragma(_LIBCUDACXX_TOSTRING(diag_suppress _WARNING))
# define _LIBCUDACXX_NV_DIAG_DEFAULT(_WARNING) _Pragma(_LIBCUDACXX_TOSTRING(diag_default _WARNING))
# endif // not MSVC
# endif // !__NVCC_DIAG_PRAGMA_SUPPORT__
#else // ^^^ _LIBCUDACXX_CUDACC ^^^ / vvv other compiler vvv
# define _LIBCUDACXX_NV_DIAG_SUPPRESS(_WARNING)
# define _LIBCUDACXX_NV_DIAG_DEFAULT(_WARNING)
#endif // other compilers

#if defined(_CCCL_COMPILER_CLANG)

// _LIBCUDACXX_ALTERNATE_STRING_LAYOUT is an old name for
Expand Down Expand Up @@ -1723,19 +1691,6 @@ typedef unsigned int char32_t;
# define _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
#endif

// Macros to enter and leave a state where deprecation warnings are suppressed.
#if defined(_CCCL_COMPILER_CLANG) || defined(_CCCL_COMPILER_GCC)
# define _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated\"") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
# define _LIBCUDACXX_SUPPRESS_DEPRECATED_POP \
_Pragma("GCC diagnostic pop")
#else
# define _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
# define _LIBCUDACXX_SUPPRESS_DEPRECATED_POP
#endif

// The _LIBCUDACXX_NODISCARD_ATTRIBUTE should only be used to define other
// NODISCARD macros to the correct attribute.
#if __has_cpp_attribute(nodiscard) || (defined(_CCCL_COMPILER_MSVC) && _CCCL_STD_VER > 2014)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

_LIBCUDACXX_BEGIN_NAMESPACE_STD

// MSVC complains about [[msvc::no_unique_address]] prior to C++20 as a vendor extension
// MSVC complains about [[no_unique_address]] prior to C++20 as a vendor extension
_CCCL_DIAG_PUSH
_CCCL_DIAG_SUPPRESS_MSVC(4848)

Expand Down Expand Up @@ -606,7 +606,7 @@ using __expected_sfinae_assign_base_t = __sfinae_assign_base<
>;

// expected<void, E> base classtemplate <class _Tp, class _Err>
// MSVC complains about [[msvc::no_unique_address]] prior to C++20 as a vendor extension
// MSVC complains about [[no_unique_address]] prior to C++20 as a vendor extension
_CCCL_DIAG_PUSH
_CCCL_DIAG_SUPPRESS_MSVC(4848)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ template <class _Arg1, class _Arg2, class _Result> struct __binary_function_keep
};

#if _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH
template <class _Arg1, class _Arg2, class _Result>
using __binary_function = binary_function<_Arg1, _Arg2, _Result>;
_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP
#else
template <class _Arg1, class _Arg2, class _Result>
using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH

template <class __Operation>
class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 binder1st
Expand Down Expand Up @@ -58,7 +58,7 @@ binder1st<__Operation>
bind1st(const __Operation& __op, const _Tp& __x)
{return binder1st<__Operation>(__op, __x);}

_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#endif // _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH

template <class __Operation>
class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 binder2nd
Expand Down Expand Up @@ -58,7 +58,7 @@ binder2nd<__Operation>
bind2nd(const __Operation& __op, const _Tp& __x)
{return binder2nd<__Operation>(__op, __x);}

_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#endif // _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH

template<class _Sp, class _Tp>
class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 mem_fun_t
Expand Down Expand Up @@ -176,7 +176,7 @@ const_mem_fun1_ref_t<_Sp,_Tp,_Ap>
mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const)
{return const_mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}

_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#endif // _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH

template <class _Arg1, class _Arg2, class _Result>
class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_binary_function
Expand All @@ -49,7 +49,7 @@ pointer_to_binary_function<_Arg1,_Arg2,_Result>
ptr_fun(_Result (*__f)(_Arg1,_Arg2))
{return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f);}

_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#endif // _CCCL_STD_VER <= 2014 || _LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH

template <class _Arg, class _Result>
class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_unary_function
Expand All @@ -49,7 +49,7 @@ pointer_to_unary_function<_Arg,_Result>
ptr_fun(_Result (*__f)(_Arg))
{return pointer_to_unary_function<_Arg,_Result>(__f);}

_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#endif // _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ template <class _Arg, class _Result> struct __unary_function_keep_layout_base {

#if _CCCL_STD_VER <= 2014 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH
template <class _Arg, class _Result>
using __unary_function = unary_function<_Arg, _Result>;
_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#else
template <class _Arg, class _Result>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ _LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _CCCL_STD_VER <= 2017 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS)

_CCCL_DIAG_SUPPRESS_DEPRECATED_PUSH
_CCCL_SUPPRESS_DEPRECATED_PUSH

template <class _Predicate>
class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 unary_negate
Expand All @@ -51,7 +51,7 @@ _LIBCUDACXX_DEPRECATED_IN_CXX17 inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUD
unary_negate<_Predicate>
not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}

_CCCL_DIAG_SUPPRESS_DEPRECATED_POP
_CCCL_SUPPRESS_DEPRECATED_POP

#endif // _CCCL_STD_VER <= 2017 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS)

Expand Down
Loading

0 comments on commit 13025d9

Please sign in to comment.