libcopp  2.2.0
task_macros.h
Go to the documentation of this file.
1 // Copyright 2023 owent
2 
3 #pragma once
4 
5 #include <libcopp/utils/config/libcopp_build_features.h>
6 
9 #include <libcopp/utils/errno.h>
10 
13 
14 // clang-format off
15 #include <libcopp/utils/config/stl_include_prefix.h> // NOLINT(build/include_order)
16 // clang-format on
17 #include <stdint.h>
18 // clang-format off
19 #include <libcopp/utils/config/stl_include_suffix.h> // NOLINT(build/include_order)
20 // clang-format on
21 
22 LIBCOPP_COTASK_NAMESPACE_BEGIN
23 struct LIBCOPP_COTASK_API_HEAD_ONLY macro_coroutine {
24  using stack_allocator_type = LIBCOPP_COPP_NAMESPACE_ID::allocator::default_statck_allocator;
25  using coroutine_type = LIBCOPP_COPP_NAMESPACE_ID::coroutine_context_container<stack_allocator_type>;
26  using value_type = int;
27 };
28 
29 template <class T>
30 struct LIBCOPP_COPP_API_HEAD_ONLY task_data_ptr_selector {
31  using type = typename LIBCOPP_COPP_NAMESPACE_ID::future::poll_storage_ptr_selector<T>::type;
32 };
33 LIBCOPP_COTASK_NAMESPACE_END
LIBCOPP_COPP_NAMESPACE_ID::allocator::default_statck_allocator stack_allocator_type
Definition: task_macros.h:24
LIBCOPP_COPP_NAMESPACE_ID::coroutine_context_container< stack_allocator_type > coroutine_type
Definition: task_macros.h:25
typename LIBCOPP_COPP_NAMESPACE_ID::future::poll_storage_ptr_selector< T >::type type
Definition: task_macros.h:31