|
1 | | -// Copyright (c) 2014-2025 Hartmut Kaiser |
| 1 | +// Copyright (c) 2014-2026 Hartmut Kaiser |
| 2 | +// Copyright (c) 2024-2026 STE||AR-Group |
2 | 3 | // |
3 | 4 | // SPDX-License-Identifier: BSL-1.0 |
4 | 5 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
@@ -443,10 +444,11 @@ namespace hpx::parallel { |
443 | 444 |
|
444 | 445 | auto smallest = *it; |
445 | 446 |
|
446 | | - using element_type = hpx::traits::proxy_value_t< |
447 | | - std::decay_t<hpx::util::invoke_result_t<Proj, |
448 | | - hpx::traits::iter_reference_t<typename std:: |
449 | | - iterator_traits<FwdIter>::value_type>>>>; |
| 447 | + using source_iter_type = |
| 448 | + typename std::iterator_traits<FwdIter>::value_type; |
| 449 | + using element_type = hpx::traits::proxy_value_t<std::decay_t< |
| 450 | + hpx::util::invoke_result_t<Proj, |
| 451 | + hpx::traits::iter_reference_t<source_iter_type>>>>; |
450 | 452 |
|
451 | 453 | element_type value = HPX_INVOKE(proj, *smallest); |
452 | 454 | util::loop_n<std::decay_t<ExPolicy>>( |
@@ -598,10 +600,11 @@ namespace hpx::parallel { |
598 | 600 |
|
599 | 601 | auto largest = *it; |
600 | 602 |
|
601 | | - using element_type = hpx::traits::proxy_value_t< |
602 | | - std::decay_t<hpx::util::invoke_result_t<Proj, |
603 | | - hpx::traits::iter_reference_t<typename std:: |
604 | | - iterator_traits<FwdIter>::value_type>>>>; |
| 603 | + using source_iter_type = |
| 604 | + typename std::iterator_traits<FwdIter>::value_type; |
| 605 | + using element_type = hpx::traits::proxy_value_t<std::decay_t< |
| 606 | + hpx::util::invoke_result_t<Proj, |
| 607 | + hpx::traits::iter_reference_t<source_iter_type>>>>; |
605 | 608 |
|
606 | 609 | element_type value = HPX_INVOKE(proj, *largest); |
607 | 610 | util::loop_n<std::decay_t<ExPolicy>>( |
@@ -760,9 +763,13 @@ namespace hpx::parallel { |
760 | 763 |
|
761 | 764 | auto result = *it; |
762 | 765 |
|
763 | | - using element_type = hpx::traits::proxy_value_t< |
764 | | - std::decay_t<hpx::util::invoke_result_t<Proj, |
765 | | - hpx::traits::iter_reference_t<Iter>>>>; |
| 766 | + using source_iter_type = decltype( |
| 767 | + std::declval<typename std::iterator_traits<PairIter>:: |
| 768 | + value_type>() |
| 769 | + .min); |
| 770 | + using element_type = hpx::traits::proxy_value_t<std::decay_t< |
| 771 | + hpx::util::invoke_result_t<Proj, |
| 772 | + hpx::traits::iter_reference_t<source_iter_type>>>>; |
766 | 773 |
|
767 | 774 | element_type min_value = HPX_INVOKE(proj, *result.min); |
768 | 775 | element_type max_value = HPX_INVOKE(proj, *result.max); |
|
0 commit comments