diff --git a/xml/issue4340.xml b/xml/issue4340.xml new file mode 100644 index 0000000000..d405e3560e --- /dev/null +++ b/xml/issue4340.xml @@ -0,0 +1,52 @@ + + + + +<code>task::promise_type::unhandled_stopped()</code> should be <code>noexcept</code> +
+Dietmar Kühl +31 Aug 2025 +99 + + +

+The function task::promise_type::unhandled_stopped() +is called from set_stopped() of a receiver and calls +set_stopped itself. These functions are required to +be noexcept. Thus, unhandled_stopped() +can't throw an exception and should be marked noexcept. +All other declarations of unhandled_stopped() are +already marked noexcept but +task::promise_type::unhandled_stopped() isn't. +

+
+ + +

+In the synopsis in add noexcept +to the declaration of task::promise_type::unhandled_stopped(): +

+namespace std::execution {
+  template<class T, class Environment>
+  class task<T, Environment>::promise_type {
+     ...
+    coroutine_handle<> unhandled_stopped() noexcept;
+    ...
+  };
+}
+
+

+

+In the specification in paragraph 13 add noexcept: +

+
+coroutine_handle<> unhandled_stopped() noexcept;
+
+

-13- Effects: Completes the asynchronous operation +associated with STATE(*this) by invoking +set_stopped(std::move(RCVR(*this))).

+
+

+
+ +