17 Language support library [support]

17.13 Coroutines [support.coroutine]

17.13.5 No-op coroutines [coroutine.noop]

17.13.5.2 Class coroutine_handle<noop_coroutine_promise> [coroutine.handle.noop]


17.13.5.2.1 General [coroutine.handle.noop.general]

17.13.5.2.2 Conversion [coroutine.handle.noop.conv]

17.13.5.2.3 Observers [coroutine.handle.noop.observers]

17.13.5.2.4 Resumption [coroutine.handle.noop.resumption]

17.13.5.2.5 Promise access [coroutine.handle.noop.promise]

17.13.5.2.6 Address [coroutine.handle.noop.address]


17.13.5.2.1 General [coroutine.handle.noop.general]

namespace std { template<> struct coroutine_handle<noop_coroutine_promise> { / [coroutine.handle.noop.conv], conversion constexpr operator coroutine_handle<>() const noexcept; / [coroutine.handle.noop.observers], observers constexpr explicit operator bool() const noexcept; constexpr bool done() const noexcept; / [coroutine.handle.noop.resumption], resumption constexpr void operator()() const noexcept; constexpr void resume() const noexcept; constexpr void destroy() const noexcept; / [coroutine.handle.noop.promise], promise access noop_coroutine_promise& promise() const noexcept; / [coroutine.handle.noop.address], address constexpr void* address() const noexcept; private: coroutine_handle(unspecified); void* ptr; / exposition only }; }

17.13.5.2.2 Conversion [coroutine.handle.noop.conv]

constexpr operator coroutine_handle<>() const noexcept;
Effects: Equivalent to: return coroutine_handle<>​::​from_address();
constexpr explicit operator bool() const noexcept;
Returns: true.
constexpr bool done() const noexcept;
Returns: false.
constexpr void operator()() const noexcept; constexpr void resume() const noexcept; constexpr void destroy() const noexcept;
Remarks: If noop_coroutine_handle is converted to coroutine_handle<>, calls to operator(), resume and destroy on that handle will also have no observable effects.
noop_coroutine_promise& promise() const noexcept;
Returns: A reference to the promise object associated with this coroutine handle.
constexpr void* address() const noexcept;
Remarks: A noop_coroutine_handle's ptr is always a non-null pointer value.

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