diff --git a/hpx/util/detail/pack_traversal_async_impl.hpp b/hpx/util/detail/pack_traversal_async_impl.hpp index e27ed3f5b15f..107ca5318d6e 100644 --- a/hpx/util/detail/pack_traversal_async_impl.hpp +++ b/hpx/util/detail/pack_traversal_async_impl.hpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -362,6 +363,12 @@ namespace util { return Range{std::begin(element), std::end(element)}; } + template > + Range make_dynamic_async_range(std::reference_wrapper ref_element) + { + return Range{std::begin(ref_element.get()), std::end(ref_element.get())}; + } + /// Represents a particular point in a asynchronous traversal hierarchy template class async_traversal_point @@ -483,7 +490,7 @@ namespace util { void async_traverse_one(Current&& current) { using ElementType = - typename std::decay::type; + typename hpx::util::decay_unwrap::type; return async_traverse_one_impl( container_category_of_t{}, std::forward(current)); diff --git a/hpx/util/detail/pack_traversal_impl.hpp b/hpx/util/detail/pack_traversal_impl.hpp index f651a85c3912..9eebaebee632 100644 --- a/hpx/util/detail/pack_traversal_impl.hpp +++ b/hpx/util/detail/pack_traversal_impl.hpp @@ -902,7 +902,7 @@ namespace util { auto traverse(Strategy, T&& element) -> decltype(std::declval().match( std::declval::type>>(), + typename hpx::util::decay_unwrap::type>>(), std::declval())); /// \copybrief traverse @@ -910,14 +910,14 @@ namespace util { auto try_traverse(Strategy, T&& element) -> decltype(std::declval().try_match( std::declval::type>>(), + typename hpx::util::decay_unwrap::type>>(), std::declval())) { // We use tag dispatching here, to categorize the type T whether // it satisfies the container or tuple like requirements. // Then we can choose the underlying implementation accordingly. return try_match( - container_category_of_t::type>{}, + container_category_of_t::type>{}, std::forward(element)); }