function object
std::ranges::minmax
- Header
<algorithm>- Draft
- [alg.min.max]
- Scope
std::ranges- cppreference
- std::ranges::minmax
Synopsis
inline constexpr /* implementation-defined */ minmax = {};Call signatures
minmax is a function object; these are its call operators as libycxx declares them, written as the functions the draft declares.
- (1)
template< std::copyable T, class Proj = std::identity, std::indirect_strict_weak_order<std::projected<const T*, Proj>> Comp = std::ranges::less> [[nodiscard]] constexpr std::ranges::minmax_result<T> minmax( std::initializer_list<T> r, Comp comp = {}, Proj proj = {}); - (2)
template< std::ranges::input_range R, class Proj = std::identity, std::indirect_strict_weak_order<std::projected<iterator_t<R>, Proj>> Comp = std::ranges::less> requires std::indirectly_copyable_storable<iterator_t<R>, std::ranges::range_value_t<R>*> [[nodiscard]] constexpr std::ranges::minmax_result<std::ranges::range_value_t<R>> minmax( R&& r, Comp comp = {}, Proj proj = {}); - (3)
template< class T, class Proj = std::identity, std::indirect_strict_weak_order<std::projected<const T*, Proj>> Comp = std::ranges::less> [[nodiscard]] constexpr std::ranges::minmax_result<const T&> minmax( const T& a, const T& b, Comp comp = {}, Proj proj = {}); - (4)
template< class ExecutionPolicy, sized-random-access-range R, class Proj = std::identity, std::indirect_strict_weak_order<std::projected<std::ranges::iterator_t<R>, Proj>> Comp = std::ranges::less> requires execution-policy<ExecutionPolicy> && std::indirectly_copyable_storable<std::ranges::iterator_t<R>, std::ranges::range_value_t<R>*> decltype(auto) minmax( ExecutionPolicy&&, R&& r, Comp comp = {}, Proj proj = {}) noexcept;