Method equals() vs equal_to() for hybrid functors
I just notices a small inconsistency in the hybrid functors introduced in !1145 (merged): The comparison functor is called "equals" there:
inline constexpr auto equals = hybridFunctor(std::equal_to<>{});
In c++ standard library there is no similar functor name, we have std::equal_to
in <functional>
, std::equal
in <algorithm>
, and std::ranges::equal
in <ranges>
. I have named the equality comparison of two integral_sequences in <dune/common/integersequence.hh>
as Dune::equal
.
On the other hand, in Java, for example, the method for comparison is called .equals(other)
. Same for the iterator facade method and some data structures in Dune. The corresponding comparison method is called "equals". But only if there is a just one argument, in the sense this->equals(other)
.
I suggest to rename this "equals" hybrid functor into equal_to
, similar to the std library functors. What do you think?