File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 22
22
#include < atomic>
23
23
#include < cstddef>
24
24
#include < exception>
25
+ #include < functional>
25
26
#include < iterator>
26
27
#include < memory>
27
28
#include < type_traits>
@@ -362,6 +363,12 @@ namespace util {
362
363
return Range{std::begin (element), std::end (element)};
363
364
}
364
365
366
+ template <typename T, typename Range = dynamic_async_range_of_t <T>>
367
+ Range make_dynamic_async_range (std::reference_wrapper<T> ref_element)
368
+ {
369
+ return Range{std::begin (ref_element.get ()), std::end (ref_element.get ())};
370
+ }
371
+
365
372
// / Represents a particular point in a asynchronous traversal hierarchy
366
373
template <typename Frame, typename ... Hierarchy>
367
374
class async_traversal_point
@@ -483,7 +490,7 @@ namespace util {
483
490
void async_traverse_one (Current&& current)
484
491
{
485
492
using ElementType =
486
- typename std::decay <decltype (*current)>::type;
493
+ typename hpx::util::decay_unwrap <decltype (*current)>::type;
487
494
return async_traverse_one_impl (
488
495
container_category_of_t <ElementType>{},
489
496
std::forward<Current>(current));
Original file line number Diff line number Diff line change @@ -902,22 +902,22 @@ namespace util {
902
902
auto traverse (Strategy, T&& element)
903
903
-> decltype(std::declval<mapping_helper>().match(
904
904
std::declval<container_category_of_t <
905
- typename std::decay <T>::type>>(),
905
+ typename hpx::util::decay_unwrap <T>::type>>(),
906
906
std::declval<T>()));
907
907
908
908
// / \copybrief traverse
909
909
template <typename T>
910
910
auto try_traverse (Strategy, T&& element)
911
911
-> decltype(std::declval<mapping_helper>().try_match(
912
912
std::declval<container_category_of_t <
913
- typename std::decay <T>::type>>(),
913
+ typename hpx::util::decay_unwrap <T>::type>>(),
914
914
std::declval<T>()))
915
915
{
916
916
// We use tag dispatching here, to categorize the type T whether
917
917
// it satisfies the container or tuple like requirements.
918
918
// Then we can choose the underlying implementation accordingly.
919
919
return try_match (
920
- container_category_of_t <typename std::decay <T>::type>{},
920
+ container_category_of_t <typename hpx::util::decay_unwrap <T>::type>{},
921
921
std::forward<T>(element));
922
922
}
923
923
You can’t perform that action at this time.
0 commit comments