Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate thrust::optional #3307

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bernhardmgruber
Copy link
Contributor

Fixes: #3306

@bernhardmgruber bernhardmgruber requested review from a team as code owners January 9, 2025 10:49
@bernhardmgruber bernhardmgruber added thrust For all items related to Thrust. backport branch/2.8.x labels Jan 9, 2025
@@ -59,11 +61,10 @@ THRUST_NAMESPACE_BEGIN
#ifndef THRUST_MONOSTATE_INPLACE_MUTEX
# define THRUST_MONOSTATE_INPLACE_MUTEX
/// \brief Used to represent an optional with no data; essentially a bool
class monostate
{};
class CCCL_DEPRECATED monostate{};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we use CCCL_DEPRECATED_BECAUSE("Use cuda::std::monostate instead")

template <typename X, typename Deleter>
_CCCL_HOST optional<unique_stream> try_acquire_stream(int, std::unique_ptr<X, Deleter>&) noexcept
template <typename X, typename Deleter>
_CCCL_HOST optional<unique_stream> try_acquire_stream(int, std::unique_ptr<X, Deleter>&) noexcept
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would rather just use cuda::std::optional here

Copy link
Collaborator

Choose a reason for hiding this comment

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

I pushed a change for that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what I tried, but you need C++17 for that :D. Also, this PR will be backported to 2.8 where we only have C++11 as well.

@miscco miscco requested a review from a team as a code owner January 9, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport branch/2.8.x thrust For all items related to Thrust.
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

Deprecate thrust::optional
2 participants