3 #define LIB_RESUMEF_VERSION 20909 // 2.9.9
7 #ifndef DOXYGEN_SKIP_PROPERTY
10 template<
class _Ty =
void>
11 struct [[nodiscard]] future_t;
13 using future_vt [[deprecated]] = future_t<>;
15 template <
typename _Ty = std::
nullptr_t,
typename _Alloc = std::allocator<
char>>
18 template<
class _Ty =
void>
21 template<
class _Ty =
void>
26 struct switch_scheduler_t;
27 #endif //DOXYGEN_SKIP_PROPERTY
29 template<
typename _PromiseT =
void>
30 using coroutine_handle = std::experimental::coroutine_handle<_PromiseT>;
31 using suspend_always = std::experimental::suspend_always;
32 using suspend_never = std::experimental::suspend_never;
34 template<
class... _Mutexes>
35 using scoped_lock = std::scoped_lock<_Mutexes...>;
40 constexpr
size_t _Version = LIB_RESUMEF_VERSION;
45 scheduler_t* this_scheduler();
49 #ifndef DOXYGEN_SKIP_PROPERTY
51 #if RESUMEF_DEBUG_COUNTER
52 extern std::mutex g_resumef_cout_mutex;
53 extern std::atomic<intptr_t> g_resumef_state_count;
54 extern std::atomic<intptr_t> g_resumef_task_count;
55 extern std::atomic<intptr_t> g_resumef_evtctx_count;
56 extern std::atomic<intptr_t> g_resumef_state_id;
64 typedef std::remove_cv_t<std::remove_reference_t<T>> type;
67 using remove_cvref_t =
typename remove_cvref<T>::type;
71 constexpr
size_t _Align_size()
73 const size_t _ALIGN_REQ =
sizeof(
void*) * 2;
74 return std::is_empty_v<_Ty> ? 0 :
75 (
sizeof(_Ty) + _ALIGN_REQ - 1) & ~(_ALIGN_REQ - 1);
79 #include "exception.inl"
81 #endif //DOXYGEN_SKIP_PROPERTY