Skip to content

Make QCoro::Generator<T> properly move-constructible#151

Merged
danvratil merged 1 commit intoqcoro:mainfrom
vicr123:features/move-constructible-generator
Feb 21, 2023
Merged

Make QCoro::Generator<T> properly move-constructible#151
danvratil merged 1 commit intoqcoro:mainfrom
vicr123:features/move-constructible-generator

Conversation

@vicr123
Copy link
Contributor

@vicr123 vicr123 commented Feb 18, 2023

QCoro::Generator<T> is currently not properly move-constructible, as the move constructor holds a reference to the existing std::coroutine_handle, destroying it when the original generator is destroyed.

This PR creates a custom move constructor for QCoro::Generator<T> in order to properly move-construct it.

@danvratil
Copy link
Collaborator

Thanks a lot for the patch (and sorry for the delayed review!)

@danvratil danvratil merged commit d9fc2a1 into qcoro:main Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants