KDAB / KDAlgorithms

Algorithm wrappers
Other
82 stars 15 forks source link

Should `min_element` and `max_element` be called `min_value` / `max_value`? #11

Closed dangelog closed 1 year ago

dangelog commented 2 years ago

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?

dfaure-kdab commented 1 year ago

I agree, I was initially a bit confused about what these would do.

But maybe SC has to be kept at this point?