Skip to content

Commit e33be08

Browse files
Dawn Perchikzygoloid
authored andcommitted
LWG3180 Inconsistently named return type for ranges::minmax_element
1 parent 187538c commit e33be08

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/algorithms.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,13 +2662,16 @@
26622662
ForwardIterator first, ForwardIterator last, Compare comp);
26632663

26642664
namespace ranges {
2665+
template<class I>
2666+
using minmax_element_result = minmax_result<I>;
2667+
26652668
template<ForwardIterator I, Sentinel<I> S, class Proj = identity,
26662669
IndirectStrictWeakOrder<projected<I, Proj>> Comp = ranges::less<>>
2667-
constexpr minmax_result<I>
2670+
constexpr minmax_element_result<I>
26682671
minmax_element(I first, S last, Comp comp = {}, Proj proj = {});
26692672
template<ForwardRange R, class Proj = identity,
26702673
IndirectStrictWeakOrder<projected<iterator_t<R>, Proj>> Comp = ranges::less<>>
2671-
constexpr minmax_result<safe_iterator_t<R>>
2674+
constexpr minmax_element_result<safe_iterator_t<R>>
26722675
minmax_element(R&& r, Comp comp = {}, Proj proj = {});
26732676
}
26742677

0 commit comments

Comments
 (0)