summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonobj.h
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2021-08-04 14:50:02 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-15 17:41:42 +0000
commitbf1abfe3e0d0eada19512d69dfe8e9e9183b946c (patch)
treec1db45bd4e1c099192281c50a4fbb512b25ee41c /src/mongo/bson/bsonobj.h
parente07b3a958f7f46b7e5fc678c86c968d1f54da1d9 (diff)
downloadmongo-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.h8
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: