@@ -407,7 +407,8 @@ namespace hpx::parallel {
407407 auto smallest = it;
408408
409409 using element_type = hpx::traits::proxy_value_t <
410- std::decay_t <decltype (HPX_INVOKE (proj, *smallest))>>;
410+ std::decay_t <hpx::util::invoke_result_t <Proj,
411+ hpx::traits::iter_reference_t <FwdIter>>>>;
411412
412413 element_type value = HPX_INVOKE (proj, *smallest);
413414 util::loop_n<std::decay_t <ExPolicy>>(
@@ -444,7 +445,9 @@ namespace hpx::parallel {
444445 auto smallest = *it;
445446
446447 using element_type = hpx::traits::proxy_value_t <
447- std::decay_t <decltype (HPX_INVOKE (proj, *smallest))>>;
448+ std::decay_t <hpx::util::invoke_result_t <Proj,
449+ hpx::traits::iter_reference_t <typename std::
450+ iterator_traits<FwdIter>::value_type>>>>;
448451
449452 element_type value = HPX_INVOKE (proj, *smallest);
450453 util::loop_n<std::decay_t <ExPolicy>>(
@@ -476,7 +479,8 @@ namespace hpx::parallel {
476479 auto smallest = first;
477480
478481 using element_type = hpx::traits::proxy_value_t <
479- std::decay_t <decltype (HPX_INVOKE (proj, *smallest))>>;
482+ std::decay_t <hpx::util::invoke_result_t <Proj,
483+ hpx::traits::iter_reference_t <FwdIter>>>>;
480484
481485 element_type value = HPX_INVOKE (proj, *smallest);
482486 util::loop (HPX_FORWARD (ExPolicy, policy), ++first, last,
@@ -559,7 +563,8 @@ namespace hpx::parallel {
559563 auto largest = it;
560564
561565 using element_type = hpx::traits::proxy_value_t <
562- std::decay_t <decltype (HPX_INVOKE (proj, *largest))>>;
566+ std::decay_t <hpx::util::invoke_result_t <Proj,
567+ hpx::traits::iter_reference_t <FwdIter>>>>;
563568
564569 element_type value = HPX_INVOKE (proj, *largest);
565570 util::loop_n<std::decay_t <ExPolicy>>(
@@ -596,7 +601,9 @@ namespace hpx::parallel {
596601 auto largest = *it;
597602
598603 using element_type = hpx::traits::proxy_value_t <
599- std::decay_t <decltype (HPX_INVOKE (proj, *largest))>>;
604+ std::decay_t <hpx::util::invoke_result_t <Proj,
605+ hpx::traits::iter_reference_t <typename std::
606+ iterator_traits<FwdIter>::value_type>>>>;
600607
601608 element_type value = HPX_INVOKE (proj, *largest);
602609 util::loop_n<std::decay_t <ExPolicy>>(
@@ -628,7 +635,8 @@ namespace hpx::parallel {
628635 auto largest = first;
629636
630637 using element_type = hpx::traits::proxy_value_t <
631- std::decay_t <decltype (HPX_INVOKE (proj, *largest))>>;
638+ std::decay_t <hpx::util::invoke_result_t <Proj,
639+ hpx::traits::iter_reference_t <FwdIter>>>>;
632640
633641 element_type value = HPX_INVOKE (proj, *largest);
634642 util::loop (HPX_FORWARD (ExPolicy, policy), ++first, last,
@@ -711,7 +719,8 @@ namespace hpx::parallel {
711719 return result;
712720
713721 using element_type = hpx::traits::proxy_value_t <
714- std::decay_t <decltype (HPX_INVOKE (proj, *it))>>;
722+ std::decay_t <hpx::util::invoke_result_t <Proj,
723+ hpx::traits::iter_reference_t <FwdIter>>>>;
715724
716725 element_type min_value = HPX_INVOKE (proj, *it);
717726 element_type max_value = min_value;
@@ -755,7 +764,8 @@ namespace hpx::parallel {
755764 auto result = *it;
756765
757766 using element_type = hpx::traits::proxy_value_t <
758- std::decay_t <decltype (HPX_INVOKE (proj, *result.min ))>>;
767+ std::decay_t <hpx::util::invoke_result_t <Proj,
768+ hpx::traits::iter_reference_t <Iter>>>>;
759769
760770 element_type min_value = HPX_INVOKE (proj, *result.min );
761771 element_type max_value = HPX_INVOKE (proj, *result.max );
@@ -801,7 +811,8 @@ namespace hpx::parallel {
801811 }
802812
803813 using element_type = hpx::traits::proxy_value_t <
804- std::decay_t <decltype (HPX_INVOKE (proj, *min))>>;
814+ std::decay_t <hpx::util::invoke_result_t <Proj,
815+ hpx::traits::iter_reference_t <FwdIter>>>>;
805816
806817 element_type min_value = HPX_INVOKE (proj, *min);
807818 element_type max_value = HPX_INVOKE (proj, *max);
0 commit comments