-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
ALL
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
This function is incompatible with modern comparators features like =default.
The standard expectations for something called operator== are broken here.
It has to return something convertible to bool.
We can still support the feature that this implements, but we should not continue to call it `operator==`, which is essentially a language-reserved name. We are not free to make it mean something else unless we're operating in a "DSL" paradigm, which I would argue BSONObj is not (as opposed to ostream operator<<, which is).
From slack #cpp-discuss thread
https://mongodb.slack.com/archives/C1MT4NHF0/p1746108016432839