cobalt icon indicating copy to clipboard operation
cobalt copied to clipboard

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

Open rotrida opened this issue 1 year ago • 6 comments

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::promise_receiver&)’ [build] 92 | receiver_ = std::move(lhs.receiver_);

rotrida avatar Mar 11 '24 21:03 rotrida

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 avatar Mar 15 '24 10:03 klemens-morgenstern

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

klemens-morgenstern avatar May 02 '24 00:05 klemens-morgenstern

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 avatar May 03 '24 13:05 rotrida

@klemens-morgenstern,

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

rotrida avatar May 09 '24 16:05 rotrida

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

klemens-morgenstern avatar May 10 '24 01:05 klemens-morgenstern

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: @.***>

rotrida avatar May 15 '24 10:05 rotrida