max_element is used to retrieve to the position (as in, an iterator) of the maximum element. But the implementation here returns the value (wrapped in an optional), not the iterator pointing to it. Should these _element functions be renamed to something like max_value?
max_element
is used to retrieve to the position (as in, an iterator) of the maximum element. But the implementation here returns the value (wrapped in anoptional
), not the iterator pointing to it. Should these_element
functions be renamed to something likemax_value
?