Skip to content

Commit

Permalink
feat(lazy_io): detach io requires r-value
Browse files Browse the repository at this point in the history
  • Loading branch information
Codesire-Deng committed Jan 8, 2024
1 parent 166be5d commit 2a2e240
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/co_context/detail/lazy_io_awaiter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class lazy_awaiter {

/*NOLINT*/ int32_t await_resume() const noexcept { return result(); }

std::suspend_never detach() noexcept {
std::suspend_never detach() && noexcept {
#if LIBURINGCXX_IS_KERNEL_REACH(5, 17)
assert(!sqe->is_cqe_skip());
sqe->set_cqe_skip();
Expand Down Expand Up @@ -462,8 +462,8 @@ struct lazy_link_timeout
using lazy_link_io::await_suspend;
using lazy_link_io::await_resume;

std::suspend_never detach() noexcept {
this->last_io->detach();
std::suspend_never detach() && noexcept {
std::move(*(this->last_io)).detach();
return {};
}

Expand Down

0 comments on commit 2a2e240

Please sign in to comment.