brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · ff71b99 Raw
73 lines · plain
1// -*- C++ -*-2//===----------------------------------------------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_COROUTINE11#define _LIBCPP_COROUTINE12 13/**14    coroutine synopsis15 16namespace std {17// [coroutine.traits]18template <class R, class... ArgTypes>19  struct coroutine_traits;20// [coroutine.handle]21template <class Promise = void>22  struct coroutine_handle;23// [coroutine.handle.compare]24constexpr bool operator==(coroutine_handle<> x, coroutine_handle<> y) noexcept;25constexpr strong_ordering operator<=>(coroutine_handle<> x, coroutine_handle<> y) noexcept;26// [coroutine.handle.hash]27template <class T> struct hash;28template <class P> struct hash<coroutine_handle<P>>;29// [coroutine.noop]30struct noop_coroutine_promise;31template<> struct coroutine_handle<noop_coroutine_promise>;32using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;33noop_coroutine_handle noop_coroutine() noexcept;34// [coroutine.trivial.awaitables]35struct suspend_never;36struct suspend_always;37} // namespace std38 39 */40 41#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)42#  include <__cxx03/__config>43#else44#  include <__config>45 46#  if _LIBCPP_STD_VER >= 2047#    include <__coroutine/coroutine_handle.h>48#    include <__coroutine/coroutine_traits.h>49#    include <__coroutine/noop_coroutine_handle.h>50#    include <__coroutine/trivial_awaitables.h>51#  endif // _LIBCPP_STD_VER >= 2052 53#  include <version>54 55// standard-mandated includes56 57// [coroutine.syn]58#  include <compare>59 60#  ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER61#    pragma GCC system_header62#  endif63 64#  if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 2065#    include <cstddef>66#    include <iosfwd>67#    include <limits>68#    include <type_traits>69#  endif70#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)71 72#endif // _LIBCPP_COROUTINE73