Remove reference to android-mips (#124021)
[llvm-project.git] / libcxx / include / __cxx03 / __coroutine / trivial_awaitables.h
blob7e34aad9cfce8188cb0ea18f6d29b58b2a21181f
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef __LIBCPP___CXX03___COROUTINE_TRIVIAL_AWAITABLES_H
10 #define __LIBCPP___CXX03___COROUTINE_TRIVIAL_AWAITABLES_H
12 #include <__cxx03/__config>
13 #include <__cxx03/__coroutine/coroutine_handle.h>
15 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16 # pragma GCC system_header
17 #endif
19 #if _LIBCPP_STD_VER >= 20
21 _LIBCPP_BEGIN_NAMESPACE_STD
23 // [coroutine.trivial.awaitables]
24 struct suspend_never {
25 _LIBCPP_HIDE_FROM_ABI constexpr bool await_ready() const noexcept { return true; }
26 _LIBCPP_HIDE_FROM_ABI constexpr void await_suspend(coroutine_handle<>) const noexcept {}
27 _LIBCPP_HIDE_FROM_ABI constexpr void await_resume() const noexcept {}
30 struct suspend_always {
31 _LIBCPP_HIDE_FROM_ABI constexpr bool await_ready() const noexcept { return false; }
32 _LIBCPP_HIDE_FROM_ABI constexpr void await_suspend(coroutine_handle<>) const noexcept {}
33 _LIBCPP_HIDE_FROM_ABI constexpr void await_resume() const noexcept {}
36 _LIBCPP_END_NAMESPACE_STD
38 #endif // __LIBCPP_STD_VER >= 20
40 #endif // __LIBCPP___CXX03___COROUTINE_TRIVIAL_AWAITABLES_H