diff --git a/include/co_context/co/when_all.hpp b/include/co_context/co/when_all.hpp index 2f3357a..cfa4d02 100644 --- a/include/co_context/co/when_all.hpp +++ b/include/co_context/co/when_all.hpp @@ -51,9 +51,9 @@ template struct all_meta : all_meta_base { static_assert(mpl::count_v == 0); - using value_type = out_type_list::template to; + using value_type = typename out_type_list::template to; using buffer_type = - mpl::map_t::template to< + typename mpl::map_t::template to< std::tuple>; buffer_type buffer; @@ -91,7 +91,7 @@ struct all_trait { public: using meta_type = all_meta; - using value_type = meta_type::value_type; + using value_type = typename meta_type::value_type; template static constexpr size_t buffer_offset_v = @@ -142,7 +142,7 @@ all(task_types... node) { using trait = detail::all_trait; - using all_meta_type = trait::meta_type; + using all_meta_type = typename trait::meta_type; all_meta_type meta{co_await lazy::who_am_i(), n}; diff --git a/include/co_context/co/when_any.hpp b/include/co_context/co/when_any.hpp index 7cc7b25..e4a2778 100644 --- a/include/co_context/co/when_any.hpp +++ b/include/co_context/co/when_any.hpp @@ -90,9 +90,10 @@ struct any_trait { using in_type_list = mpl::type_list; using out_type_list = - mpl::remove_t::template prepend; + typename mpl::remove_t::template prepend< + std::monostate>; - using variant_type = out_type_list::template to; + using variant_type = typename out_type_list::template to; public: static constexpr bool is_all_void = @@ -152,7 +153,7 @@ any(task_types... node) { static_assert(n >= 2, "too few tasks for `any(...)`"); using trait = detail::any_trait; - using meta_type = trait::meta_type; + using meta_type = typename trait::meta_type; auto meta_ptr = std::make_shared(co_await lazy::who_am_i()); auto spawn_all = [&](std::index_sequence) { @@ -177,7 +178,7 @@ any(task_types... node) { if constexpr (trait::is_all_void) { co_return meta_ptr->idx; } else { - using value_type = trait::value_type; + using value_type = typename trait::value_type; co_return value_type{meta_ptr->idx, std::move(meta_ptr->buffer)}; } } @@ -240,7 +241,7 @@ struct some_trait { private: using in_type_list = mpl::type_list; - using element_type = any_trait::value_type; + using element_type = typename any_trait::value_type; public: using value_type = std::vector; @@ -300,7 +301,7 @@ some(uint32_t min_complete, task_types... node) { assert(min_complete >= 1 && "min_complete should be at least 1"); using trait = detail::some_trait; - using meta_type = trait::meta_type; + using meta_type = typename trait::meta_type; auto meta_ptr = std::make_shared(co_await lazy::who_am_i(), min_complete);