Skip to content

Commit ea3ff76

Browse files
jensmaurerzygoloid
authored andcommitted
[dcl.fct.def.coroutine] Add missing 'noexcept' for final_suspend.
The invocation of final_suspend is guaranteed to be non-throwing, thus final_suspend in the example needs to be declared 'noexcept'.
1 parent ca15543 commit ea3ff76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/declarations.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6404,7 +6404,7 @@
64046404
static auto get_return_object_on_allocation_failure() { return generator{nullptr}; }
64056405
auto get_return_object() { return generator{handle::from_promise(*this)}; }
64066406
auto initial_suspend() { return std::suspend_always{}; }
6407-
auto final_suspend() { return std::suspend_always{}; }
6407+
auto final_suspend() noexcept { return std::suspend_always{}; }
64086408
void unhandled_exception() { std::terminate(); }
64096409
void return_void() {}
64106410
auto yield_value(int value) {

0 commit comments

Comments
 (0)