Skip to content

Deprecate cuda::std::rel_ops in c++20#8029

Merged
davebayer merged 1 commit intoNVIDIA:mainfrom
davebayer:deprecate_rel_ops
Mar 15, 2026
Merged

Deprecate cuda::std::rel_ops in c++20#8029
davebayer merged 1 commit intoNVIDIA:mainfrom
davebayer:deprecate_rel_ops

Conversation

@davebayer
Copy link
Contributor

I accidently came across this

@davebayer davebayer requested a review from a team as a code owner March 13, 2026 14:55
@davebayer davebayer requested a review from griwes March 13, 2026 14:55
@github-project-automation github-project-automation bot moved this to Todo in CCCL Mar 13, 2026
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Mar 13, 2026
@davebayer davebayer requested a review from a team as a code owner March 13, 2026 14:58
Comment on lines -53 to -69
#if _LIBCUDACXX_HAS_SPACESHIP_OPERATOR()
[[nodiscard]] _CCCL_API constexpr auto operator<=>(completion_behavior __a, completion_behavior __b) noexcept
-> ::cuda::std::strong_ordering
{
return static_cast<int>(__a) <=> static_cast<int>(__b);
}
#else
[[nodiscard]] _CCCL_API constexpr auto operator<(completion_behavior __a, completion_behavior __b) noexcept -> bool
{
return static_cast<int>(__a) < static_cast<int>(__b);
}
[[nodiscard]] _CCCL_API constexpr auto operator==(completion_behavior __a, completion_behavior __b) noexcept -> bool
{
return static_cast<int>(__a) == static_cast<int>(__b);
}
using namespace ::cuda::std::rel_ops;
#endif
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we found out with @bernhardmgruber, enum class is comparable by default

@davebayer davebayer enabled auto-merge (squash) March 13, 2026 16:00
@davebayer davebayer merged commit f7fcf6f into NVIDIA:main Mar 15, 2026
301 of 310 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants