C++ Logo

std-discussion

Advanced search

Re: coroutine generator example issue

From: Edward Catmur <ecatmur_at_[hidden]>
Date: Thu, 20 Oct 2022 08:35:48 +0100
This has already been fixed. See
https://github.com/cplusplus/draft/pull/4201

On Thu, 20 Oct 2022 at 08:21, dfleury2--- via Std-Discussion <
std-discussion_at_[hidden]> wrote:

> Hi,
> I am currently working on coroutine, and how they works.
>
> In the C++ ISO draft (N4860), on at 9.5.4-10, page 209, there is an
> generator example.
>
> The line : "auto final_suspend() { return std::suspend_always{}; }"
> causes an issue to gcc 12.2, where it expects a noexcept qualifier for
> final_suspend.
>
> At 9.5.4-15, it is said that "The expression co_await promise .
> final_suspend() shall not be potentially-throwing"
>
> Here I am sure what mean exactly "shall", and if gcc is too conservative,
> or the example miss the noexcept qualifier.
>
> Regards,
>
> PS: Since I have only access to the draft, may be something has changed in
> the final document.
>
> --
> Std-Discussion mailing list
> Std-Discussion_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
>

Received on 2022-10-20 07:36:00