Previous description:
We should add equality/inequality operators to all options classes and result classes. Additionally, we should audit any classes with existing `==` to make sure they also having corresponding `!=` implementations.
Adding equality operators to a number of struct-like classes in the codebase would facilitate testing and possibly be useful to users. We should make a decision on which classes to add equality operators to (options classes? model classes? hint? uri? pipeline? validation_criteria?), and update these classes accordingly.
As part of this ticket, we should audit existing classes to see if any are providing operator==() but are failing to provide operator!=(), as we've noticed at least one class in this state (mongocxx::read_preference).
Original description:
hint.hpp defines equality operations against std::string and bsoncxx::document::view, but does not define equality operations against other hints. An operator== overload should be provided to compare two hint objects, and we should consider deprecating the existing operator== overloads.
- is related to
-
CXX-1145 Remove CHECK_OPTIONAL_ARGUMENT_WITHOUT_EQUALITY() macro, define equality/inequality operators where needed
-
- Closed
-