12 template<
typename Result,
typename ErrorType>
15 template<
typename Result,
typename ErrorType>
41 template<
typename Promise>
42 inline auto await_suspend(std::coroutine_handle<Promise> coro)
noexcept -> std::coroutine_handle<>
54 return coro.promise()._error_continuation;
97 inline void return_value(
Result const& value)
noexcept(std::is_nothrow_copy_constructible_v<Result>)
#define ICE_ASSERT_CORE(expression)
Definition assert_core.hxx:43
Definition expected.hxx:16
SPDX-License-Identifier: MIT.
Definition array.hxx:12
@ Canceled
Task was canceled at any point of it's lifetime.
Definition task_info.hxx:32
@ Succeeded
Task finished execution with a valid result.
Definition task_info.hxx:29
@ Failed
Task finished execution but results are invalid.
Definition task_info.hxx:35
ice::Expected< ice::ErrorCode > Result
Definition expected.hxx:197
Definition task_expected.hxx:12
Definition task_expected_promise.hxx:38
auto await_suspend(std::coroutine_handle< Promise > coro) noexcept -> std::coroutine_handle<>
Definition task_expected_promise.hxx:42
constexpr bool await_ready() const noexcept
Definition task_expected_promise.hxx:39
constexpr void await_resume() const noexcept
Definition task_expected_promise.hxx:64
auto get_return_object() noexcept -> ice::TaskExpected< Result, ErrorType >
Definition task_expected.hxx:276
ErrorType _error_value
Definition task_expected_promise.hxx:141
constexpr auto final_suspend() noexcept
Definition task_expected_promise.hxx:67
char _value[sizeof(Result)]
Definition task_expected_promise.hxx:140
std::coroutine_handle _error_continuation
Definition task_expected_promise.hxx:145
void return_value(ErrorType error) noexcept
Definition task_expected_promise.hxx:89
ErrorType * _error_pointer
Definition task_expected_promise.hxx:144
auto expected_moved() noexcept -> ice::Expected< Result, ErrorType >
Definition task_expected_promise.hxx:120
void return_value(TypeExpected &&expected) noexcept(std::is_nothrow_move_constructible_v< Result >)
Definition task_expected_promise.hxx:73
~TaskExpectedPromise() noexcept
Definition task_expected_promise.hxx:23
auto expected() noexcept -> ice::Expected< Result, ErrorType >
Definition task_expected_promise.hxx:107
void return_value(Result &&value) noexcept(std::is_nothrow_move_constructible_v< Result >)
Definition task_expected_promise.hxx:102
TaskExpectedPromise() noexcept
Definition task_expected_promise.hxx:18
void return_value(Result const &value) noexcept(std::is_nothrow_copy_constructible_v< Result >)
Definition task_expected_promise.hxx:97
auto result() noexcept -> Result &
Definition task_expected_promise.hxx:132
Definition task_info.hxx:50
Definition task_handle.hxx:143
ice::TaskInfo * _info
Definition task_handle.hxx:144
Definition task_promise_base.hxx:15
auto await_suspend(ice::coroutine_handle< Promise > coro) noexcept -> ice::coroutine_handle<>
Definition task_promise_base.hxx:59
Definition task_promise_base.hxx:13