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

Skip to content

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

@Ankkatalo

Description

@Ankkatalo

Greetings.

I'm looking at task.hpp here.

You're using coro::detail::promise::return_void() to rethrow the exception after the end of the coroutine. That part I understand.

But according to the spec, promise::return_void() is also called automatically during co_return. From the coroutine itself. Where a rethrow makes no sense.

This is a strange double use of the function, and I think it's just a bug. Or I don't get it, which is always a possibility.
In the case of promise-of-not-void you also use return_value() function for two purposes, but that works since they are distinct by parameter overload.

Best Regards, Jørn

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions