std::max_element
From cppreference.com
| Defined in header <algorithm>
|
||
template< class ForwardIt > ForwardIt max_element( ForwardIt first, ForwardIt last ); |
(1) | (constexpr since C++17) |
| template< class ExecutionPolicy, class ForwardIt > ForwardIt max_element( ExecutionPolicy&& policy, |
(2) | (since C++17) |
template< class ForwardIt, class Compare > ForwardIt max_element( ForwardIt first, ForwardIt last, |
(3) | (constexpr since C++17) |
| template< class ExecutionPolicy, class ForwardIt, class Compare > ForwardIt max_element( ExecutionPolicy&& policy, |
(4) | (since C++17) |
Finds the greatest element in the range [first, last).
1) Elements are compared using operator<(until C++20)