Namespaces
Variants
Actions

std::coroutine_handle<Promise>::operator=

From cppreference.com
 
C++
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Coroutine support
Coroutine traits
Coroutine handle
No-op coroutines
Trivial awaitables
Range generators
(C++23)
 
std::coroutine_handle
coroutine_handle& operator=( std::nullptr_t ) noexcept;
(1) (since C++20)
coroutine_handle& operator=( const coroutine_handle& other ) = default;
(2) (since C++20)
coroutine_handle& operator=( coroutine_handle&& other ) = default;
(3) (since C++20)

Replaces the underlying address.

1) Replaces the underlying address with a null pointer value. After assignment, *this does not refer to a coroutine. This assignment operator is not declared for specialization std::coroutine_handle<std::noop_coroutine_promise>.
2,3) Replaces the underlying address with the one of other. Copy and move assignment operators are equivalent to implicitly declared ones.

[edit] Parameters

other - another coroutine_handle to assign from

[edit] Return value

*this

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant