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

DeferredProxyCoroutine::await_transform() perfectly-forwards result #3392

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

harrishancock
Copy link
Collaborator

Our current implementation of await_transform() requires that we return a result by value, by dint of returning auto. An upcoming capnproto patch will change await_transform()'s behavior to just be a pass-through, deferring the actual awaiter construction to a new operator co_await implementation. By returning decltype(auto), we become compatible with capnproto both before and after that patch.

Our current implementation of await_transform() requires that we return a result by value, by dint of returning `auto`. An upcoming capnproto patch will change await_transform()'s behavior to just be a pass-through, deferring the actual awaiter construction to a new `operator co_await` implementation. By returning `decltype(auto)`, we become compatible with capnproto both before and after that patch.
@harrishancock harrishancock requested a review from kentonv January 22, 2025 17:16
@harrishancock harrishancock requested review from a team as code owners January 22, 2025 17:16
harrishancock added a commit to capnproto/capnproto that referenced this pull request Jan 22, 2025
@harrishancock harrishancock merged commit f1d64f8 into main Jan 23, 2025
17 checks passed
@harrishancock harrishancock deleted the harris/tweak-deferred-proxy-await-transform branch January 23, 2025 11:01
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