Files
cppdraft_translate/cppdraft/coroutine/handle/con.md
2025-10-25 03:02:53 +03:00

1.7 KiB

[coroutine.handle.con]

17 Language support library [support]

17.13 Coroutines [support.coroutine]

17.13.4 Class template coroutine_handle [coroutine.handle]

17.13.4.2 Construct/reset [coroutine.handle.con]

🔗

constexpr coroutine_handle() noexcept; constexpr coroutine_handle(nullptr_t) noexcept;

1

#

Postconditions: address() == nullptr.

🔗

static coroutine_handle from_promise(Promise& p);

2

#

Preconditions: p is a reference to a promise object of a coroutine.

3

#

Postconditions: addressof(h.promise()) == addressof(p).

4

#

Returns: A coroutine handle h referring to the coroutine.

🔗

coroutine_handle& operator=(nullptr_t) noexcept;

5

#

Postconditions: address() == nullptr.

6

#

Returns: *this.