Skip to content

Commit 7309ca0

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 b9e7847 commit 7309ca0

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
@@ -6400,7 +6400,7 @@
64006400
static auto get_return_object_on_allocation_failure() { return generator{nullptr}; }
64016401
auto get_return_object() { return generator{handle::from_promise(*this)}; }
64026402
auto initial_suspend() { return std::suspend_always{}; }
6403-
auto final_suspend() { return std::suspend_always{}; }
6403+
auto final_suspend() noexcept { return std::suspend_always{}; }
64046404
void unhandled_exception() { std::terminate(); }
64056405
void return_void() {}
64066406
auto yield_value(int value) {

0 commit comments

Comments
 (0)