From dec8270fa4c4a66a52171b38bacf190cd3c43564 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dietmar=20K=C3=BChl?=
+The specification of
+The intention is that the coroutine frame is destroyed before any
+of the completion functions is called. One implication of this
+requirement is that the result and error objects can't be stored
+in the
+The proposed resolution is to add a paragraph to the specification
+of
+task's coroutine frame may be released latetask doesn't spell out when the
+coroutine frame is destroyed (i.e., when handle.destroy()
+is called). As a result the lifetime of arguments passed to the
+coroutine and/or of local variables in the coroutine body may be
+longer than expected.
+promise_type when the completion function is
+called although the exposition-only members result
+and errors imply exactly that. Instead the data
+needs to be stored in the operation state object or it needs to be
+moved to a different place before calling destroy().
+promise_type in [task.promise] that spells
+out that the coroutine frame is destroyed before any of the completion
+functions is called. To actually do that the exposition-only members
+result and errors can't
+remain as members of the promise_type. While writing
+the relevant change it turned out that errors
+is a variant which only ever stores an
+exception_ptr (the other potential errors are immediately
+reported via the awaiter return from yield_value).
+Thus, the variant can be replaced with an
+exception_ptr.
+destroy().
The proposed resolution is to add a paragraph to the specification
-of promise_type in [task.promise] that spells
+of promise_type in result and errors can't