tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
suspend_always.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_COROUTINE_SUSPEND_ALWAYS_HPP
4#define TETL_COROUTINE_SUSPEND_ALWAYS_HPP
5
7
8#if defined(__cpp_coroutines)
9
10namespace etl {
11
14 [[nodiscard]] constexpr auto await_ready() const noexcept -> bool
15 {
16 (void)this;
17 return false;
18 }
19
20 constexpr auto await_suspend(coroutine_handle<> /*unused*/) const noexcept -> void { (void)this; }
21
22 constexpr auto await_resume() const noexcept -> void { (void)this; }
23};
24
25} // namespace etl
26
27#endif // defined(__cpp_coroutines)
28
29#endif // TETL_COROUTINE_SUSPEND_ALWAYS_HPP
Definition adjacent_find.hpp:8
Definition coroutine_handle.hpp:15
Definition suspend_always.hpp:13
constexpr auto await_suspend(coroutine_handle<>) const noexcept -> void
Definition suspend_always.hpp:20
constexpr auto await_resume() const noexcept -> void
Definition suspend_always.hpp:22
constexpr auto await_ready() const noexcept -> bool
Definition suspend_always.hpp:14