cppcoro icon indicating copy to clipboard operation
cppcoro copied to clipboard

final_suspend is required to be non-throwing

Open Kyle-Thompson opened this issue 3 years ago • 2 comments

I'm using this project running off the master branch in a pet project of mine and compiling with clang on the latest version of master. When attempting to compile I get the following error

/.../cppcoro/include/cppcoro/generator.hpp:36:83: note: must be declared with 'noexcept'
                        constexpr std::experimental::suspend_always final_suspend() const { return {}; }
                           

Making this function noexcept solved the problem but this seems odd to me. If the correct solution was to just add noexcept I'd assume that it would already be there. Is this a bug or am I just doing something wrong?

Kyle-Thompson avatar Jul 11 '20 01:07 Kyle-Thompson

it seems like this is a requirement which was only added later to the compiler.

mellester avatar Aug 18 '20 18:08 mellester

Is this something that can be patched in now or is there no plan to support this requirement until later?

Kyle-Thompson avatar Aug 21 '20 13:08 Kyle-Thompson