boostorg / cobalt

Coroutines for C++20 & asio
https://www.boost.org/doc/libs/master/libs/cobalt/doc/html/index.html
207 stars 24 forks source link

Can't erase on vector<cobalt::promise<void>> #159

Open rotrida opened 6 months ago

rotrida commented 6 months ago

I'm using a vector or a deque to wait for my promises to complete.

std::deque<boost::cobalt::promise<void>> session_promisses;

When I try to erase,

session_promisses.erase(session_promisses.begin() + session_index);

I get the following error:

use of deleted function ‘boost::cobalt::detail::promise_receiver& boost::cobalt::detail::promise_receiver::operator=(const boost::cobalt::detail::promisereceiver&)’ [build] 92 | receiver = std::move(lhs.receiver_);

klemens-morgenstern commented 6 months ago

It looks like the promises are currently not assignable. I'll fix this, but that won't make it into boost before 1.86. In the meantime a list should work.

klemens-morgenstern commented 5 months ago

Actually made it into the last release, can you verify the current boost release solved the issue?

rotrida commented 5 months ago

Will check soon. I'm using boost via conan. As soon as the release is available there.

Thanks.

On Thu, 2 May 2024 at 01:41, Klemens Morgenstern @.***> wrote:

Actually made it into the last release, can you verify the current boost release solved the issue?

— Reply to this email directly, view it on GitHub https://github.com/boostorg/cobalt/issues/159#issuecomment-2089344202, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKTWNTUYUPWQUMAIRHYXHPTZAGDSTAVCNFSM6AAAAABERCO2WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZGM2DIMRQGI . You are receiving this because you authored the thread.Message ID: @.***>

rotrida commented 4 months ago

@klemens-morgenstern,

I believe the fix isn't on boost 1.85. The error is still happening.

klemens-morgenstern commented 4 months ago

Seems I didn't merge in time. That's a shame.

rotrida commented 4 months ago

No worries. Let's check on the next one.

Thanks again!

On Fri, 10 May 2024 at 02:22, Klemens Morgenstern @.***> wrote:

Seems I didn't merge in time. That's a shame.

— Reply to this email directly, view it on GitHub https://github.com/boostorg/cobalt/issues/159#issuecomment-2103682512, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKTWNTTGCBMWCOEAJKT5UP3ZBQOMBAVCNFSM6AAAAABERCO2WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTGY4DENJRGI . You are receiving this because you authored the thread.Message ID: @.***>