comparison functor forms vs. operator<
in , recommends opposing overloading any operators ("except rare, special circumstances"). specifically, recommends:
in particular, overload
operator==operator<only that
your category used pivotal an
stl container; instead, should
emanate equivalence comparison functor
forms dogmatic container.
i'm small hairy such functor feeling like, nonetheless sure doubt is, why wish your possess functors this? wouldn't defining operator<, controlling customary std::less<t> function, simpler? there any advantage controlling over other?
Comments
Post a Comment