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

Include <utility> since we use std::exchange #505

Merged

Conversation

robertmaynard
Copy link
Contributor

No description provided.

@robertmaynard robertmaynard added bug Something isn't working non-breaking Introduces a non-breaking change labels Oct 22, 2024
@robertmaynard robertmaynard requested a review from a team as a code owner October 22, 2024 19:05
@jakirkham
Copy link
Member

jakirkham commented Oct 22, 2024

Relevant usage on these lines below

StreamFuture(StreamFuture&& o) noexcept
: _devPtr_base{std::exchange(o._devPtr_base, nullptr)},
_stream{std::exchange(o._stream, nullptr)},
_val{std::exchange(o._val, nullptr)},
_stream_synchronized{o._stream_synchronized}
{
}
StreamFuture& operator=(StreamFuture&& o) noexcept
{
_devPtr_base = std::exchange(o._devPtr_base, nullptr);
_stream = std::exchange(o._stream, nullptr);
_val = std::exchange(o._val, nullptr);
_stream_synchronized = o._stream_synchronized;
return *this;
}

Also here's CPP reference's page one std::exchange mentioning it comes from <utility>

Copy link
Member

@jakirkham jakirkham left a comment

Choose a reason for hiding this comment

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

Thanks Rob! 🙏

@jakirkham
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit 52b672b into rapidsai:branch-24.12 Oct 23, 2024
57 checks passed
@robertmaynard robertmaynard deleted the bug/include_std_exchange_header branch November 8, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants