17 Language support library [language.support]

17.12 Coroutines [support.coroutine]

17.12.4 No-op coroutines [coroutine.noop]

17.12.4.2 Class coroutine_­handle<noop_­coroutine_­promise> [coroutine.handle.noop]

namespace std {
  template<>
  struct coroutine_handle<noop_coroutine_promise> : coroutine_handle<>
  {
    // [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);
  };
}

17.12.4.2.1 Observers [coroutine.handle.noop.observers]

constexpr explicit operator bool() const noexcept;
Returns: true.
constexpr bool done() const noexcept;
Returns: false.

17.12.4.2.2 Resumption [coroutine.handle.noop.resumption]

constexpr void operator()() const noexcept; constexpr void resume() const noexcept; constexpr void destroy() const noexcept;
Effects: None.
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.

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

noop_coroutine_promise& promise() const noexcept;
Returns: A reference to the promise object associated with this coroutine handle.

17.12.4.2.4 Address [coroutine.handle.noop.address]

constexpr void* address() const noexcept;
Returns: ptr.
Remarks: A noop_­coroutine_­handle's ptr is always a non-null pointer value.