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

Simplify implementation of .then() #109

Merged
merged 5 commits into from
Aug 13, 2022
Merged

Simplify implementation of .then() #109

merged 5 commits into from
Aug 13, 2022

Conversation

danvratil
Copy link
Owner

No description provided.

We make use of constexpr to handle the case where we need to co_await the
callback and when we just want to return the result of the callback without
co_awaiting it.
For the optional ErrorCallback we simply provide a default one which just
rethrows the current exception.
Use constexpr to handle invocation with arguments or without.
Avoid confusion with std::invoke and std::invoke_result. The new
names refer to callbacks.
@danvratil danvratil marked this pull request as ready for review August 13, 2022 21:32
@danvratil danvratil merged commit 1270cb1 into main Aug 13, 2022
@danvratil danvratil deleted the cleanup/simplify-then branch August 13, 2022 21:40
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.

None yet

1 participant