You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default approach is for the call to the coroutine function to throw an exception itself if allocation of the coroutine frame fails (typically due to std::bad_alloc).
For coroutine types that return a task, should we instead implement the promise_type::get_return_object_on_allocation_failure method to return a special task value that defers throwing the std::bad_alloc exception until the returned task is awaited?
This would make it possible to declare coroutine functions as noexcept (provided captured parameter copies all have noexcept copy/move constructors).
The text was updated successfully, but these errors were encountered:
The default approach is for the call to the coroutine function to throw an exception itself if allocation of the coroutine frame fails (typically due to
std::bad_alloc
).For coroutine types that return a task, should we instead implement the
promise_type::get_return_object_on_allocation_failure
method to return a special task value that defers throwing thestd::bad_alloc
exception until the returned task is awaited?This would make it possible to declare coroutine functions as noexcept (provided captured parameter copies all have noexcept copy/move constructors).
The text was updated successfully, but these errors were encountered: