5 #include <libcopp/utils/config/libcopp_build_features.h>
9 LIBCOPP_COTASK_NAMESPACE_BEGIN
22 template <
typename Tt>
23 LIBCOPP_COTASK_API_HEAD_ONLY Tt *
get() {
24 #if defined(LIBCOPP_MACRO_ENABLE_RTTI) && LIBCOPP_MACRO_ENABLE_RTTI
25 return dynamic_cast<Tt *
>(
get_task());
27 return static_cast<Tt *
>(
get_task());
31 LIBCOPP_COTASK_NAMESPACE_END
LIBCOPP_COTASK_API impl::task_impl * get_task() LIBCOPP_MACRO_NOEXCEPT
get current running task
LIBCOPP_COTASK_API_HEAD_ONLY Tt * get()
get current running task and try to convert type