diff options
author | Andrew Morrow <acm@mongodb.com> | 2021-08-04 14:50:02 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-08-15 17:41:42 +0000 |
commit | bf1abfe3e0d0eada19512d69dfe8e9e9183b946c (patch) | |
tree | c1db45bd4e1c099192281c50a4fbb512b25ee41c /src/mongo/bson/bsonobj.h | |
parent | e07b3a958f7f46b7e5fc678c86c968d1f54da1d9 (diff) | |
download | mongo-bf1abfe3e0d0eada19512d69dfe8e9e9183b946c.tar.gz |
SERVER-59230 Fix compile errors in C++20 mode with GCC 11 and clang 12
Diffstat (limited to 'src/mongo/bson/bsonobj.h')
-rw-r--r-- | src/mongo/bson/bsonobj.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h index cf168312940..bfdc67e184f 100644 --- a/src/mongo/bson/bsonobj.h +++ b/src/mongo/bson/bsonobj.h @@ -730,11 +730,11 @@ public: return &_cur; } - bool operator==(const BSONObjStlIterator& other) { - return _cur.rawdata() == other._cur.rawdata(); + friend bool operator==(const BSONObjStlIterator& lhs, const BSONObjStlIterator& rhs) { + return lhs._cur.rawdata() == rhs._cur.rawdata(); } - bool operator!=(const BSONObjStlIterator& other) { - return !(*this == other); + friend bool operator!=(const BSONObjStlIterator& lhs, const BSONObjStlIterator& rhs) { + return !(lhs == rhs); } private: |