12e6ae1d3SChuanqi Xu// -*- C++ -*- 22e6ae1d3SChuanqi Xu//===----------------------------------------------------------------------===// 32e6ae1d3SChuanqi Xu// 42e6ae1d3SChuanqi Xu// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 52e6ae1d3SChuanqi Xu// See https://llvm.org/LICENSE.txt for license information. 62e6ae1d3SChuanqi Xu// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 72e6ae1d3SChuanqi Xu// 82e6ae1d3SChuanqi Xu//===----------------------------------------------------------------------===// 92e6ae1d3SChuanqi Xu 102e6ae1d3SChuanqi Xu#ifndef _LIBCPP_COROUTINE 112e6ae1d3SChuanqi Xu#define _LIBCPP_COROUTINE 122e6ae1d3SChuanqi Xu 132e6ae1d3SChuanqi Xu/** 142e6ae1d3SChuanqi Xu coroutine synopsis 152e6ae1d3SChuanqi Xu 162e6ae1d3SChuanqi Xunamespace std { 172e6ae1d3SChuanqi Xu// [coroutine.traits] 182e6ae1d3SChuanqi Xutemplate <class R, class... ArgTypes> 192e6ae1d3SChuanqi Xu struct coroutine_traits; 202e6ae1d3SChuanqi Xu// [coroutine.handle] 212e6ae1d3SChuanqi Xutemplate <class Promise = void> 222e6ae1d3SChuanqi Xu struct coroutine_handle; 232e6ae1d3SChuanqi Xu// [coroutine.handle.compare] 242e6ae1d3SChuanqi Xuconstexpr bool operator==(coroutine_handle<> x, coroutine_handle<> y) noexcept; 252e6ae1d3SChuanqi Xuconstexpr strong_ordering operator<=>(coroutine_handle<> x, coroutine_handle<> y) noexcept; 262e6ae1d3SChuanqi Xu// [coroutine.handle.hash] 272e6ae1d3SChuanqi Xutemplate <class T> struct hash; 282e6ae1d3SChuanqi Xutemplate <class P> struct hash<coroutine_handle<P>>; 292e6ae1d3SChuanqi Xu// [coroutine.noop] 302e6ae1d3SChuanqi Xustruct noop_coroutine_promise; 312e6ae1d3SChuanqi Xutemplate<> struct coroutine_handle<noop_coroutine_promise>; 322e6ae1d3SChuanqi Xuusing noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>; 332e6ae1d3SChuanqi Xunoop_coroutine_handle noop_coroutine() noexcept; 342e6ae1d3SChuanqi Xu// [coroutine.trivial.awaitables] 352e6ae1d3SChuanqi Xustruct suspend_never; 362e6ae1d3SChuanqi Xustruct suspend_always; 372e6ae1d3SChuanqi Xu} // namespace std 382e6ae1d3SChuanqi Xu 392e6ae1d3SChuanqi Xu */ 402e6ae1d3SChuanqi Xu 41385cc25aSLouis Dionne#include <__assert> // all public C++ headers provide the assertion handler 422e6ae1d3SChuanqi Xu#include <__config> 432e6ae1d3SChuanqi Xu#include <__coroutine/coroutine_handle.h> 442e6ae1d3SChuanqi Xu#include <__coroutine/coroutine_traits.h> 454d81a46fSArthur O'Dwyer#include <__coroutine/noop_coroutine_handle.h> 462e6ae1d3SChuanqi Xu#include <__coroutine/trivial_awaitables.h> 472e6ae1d3SChuanqi Xu#include <version> 482e6ae1d3SChuanqi Xu 49*de4a57cbSLouis Dionne#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES 50*de4a57cbSLouis Dionne# include <iosfwd> 51*de4a57cbSLouis Dionne#endif 52*de4a57cbSLouis Dionne 53db1978b6SNikolas Klauser// standard-mandated includes 54db1978b6SNikolas Klauser#include <compare> 55db1978b6SNikolas Klauser 562e6ae1d3SChuanqi Xu#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER 572e6ae1d3SChuanqi Xu# pragma GCC system_header 582e6ae1d3SChuanqi Xu#endif 592e6ae1d3SChuanqi Xu 602e6ae1d3SChuanqi Xu#endif // _LIBCPP_COROUTINE 61