Files
2025-10-25 03:02:53 +03:00

14 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[coroutine.syn]
# 17 Language support library [[support]](./#support)
## 17.13 Coroutines [[support.coroutine]](support.coroutine#coroutine.syn)
### 17.13.2 Header <coroutine> synopsis [coroutine.syn]
[🔗](#header:%3ccoroutine%3e)
// all freestanding#include <compare> // see [[compare.syn]](compare.syn "17.12.1Header <compare> synopsis")namespace std {// [[coroutine.traits]](coroutine.traits "17.13.3Coroutine traits"), coroutine traitstemplate<class R, class... ArgTypes>struct coroutine_traits; // [[coroutine.handle]](coroutine.handle "17.13.4Class template coroutine_­handle"), coroutine handletemplate<class Promise = void>struct coroutine_handle; // [[coroutine.handle.compare]](coroutine.handle.compare "17.13.4.8Comparison operators"), comparison operatorsconstexpr bool operator==(coroutine_handle<> x, coroutine_handle<> y) noexcept; constexpr strong_ordering operator<=>(coroutine_handle<> x, coroutine_handle<> y) noexcept; // [[coroutine.handle.hash]](coroutine.handle.hash "17.13.4.9Hash support"), hash supporttemplate<class T> struct hash; template<class P> struct hash<coroutine_handle<P>>; // [[coroutine.noop]](coroutine.noop "17.13.5No-op coroutines"), no-op coroutinesstruct noop_coroutine_promise; template<> struct coroutine_handle<noop_coroutine_promise>; using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
noop_coroutine_handle noop_coroutine() noexcept; // [[coroutine.trivial.awaitables]](coroutine.trivial.awaitables "17.13.6Trivial awaitables"), trivial awaitablesstruct suspend_never; struct suspend_always;}