Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jbaldwin
Copy link
Owner

The return_void() overload was throwing, but this is
incorrect per the standard, it should effectively do
nothing. This was an error on my part since I over-
loaded the non-void task return_value(T) -> void
and return_value() -> T fns. This overload isn't
possible with the void versions since the signature
is identical, thus the bug caused the compiler's coroutine
version to re-throw exceptions at the wrong time.

The return_void() overload was throwing, but this is
incorrect per the standard, it should effectively do
nothing.  This was an error on my part since I over-
loaded the non-void task<T> return_value(T) -> void
and return_value() -> T fns.  This overload isn't
possible with the void versions since the signature
is identical, thus the bug caused the compiler's coroutine
version to re-throw exceptions at the wrong time.
@jbaldwin jbaldwin added the bug Something isn't working label Nov 27, 2021
@jbaldwin jbaldwin self-assigned this Nov 27, 2021
@jbaldwin jbaldwin linked an issue Nov 27, 2021 that may be closed by this pull request
@jbaldwin jbaldwin merged commit 5495bfa into master Dec 4, 2021
@jbaldwin jbaldwin deleted the issue-109/return_void_overloads_bug branch December 4, 2021 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coco::detail::promise<void>::return_void(): Misplaced rethrow

1 participant