Fixup implementation of equality operator

This commit is contained in:
Christian Mazakas
2022-10-07 15:31:16 -07:00
parent 1fa823d815
commit 2907083b73
2 changed files with 2 additions and 2 deletions

View File

@ -400,7 +400,7 @@ namespace boost {
return (lhs.size() == rhs.size()) && ([&] {
for (auto const& kvp : lhs) {
auto pos = rhs.find(kvp.first);
if (pos != rhs.end() && (pos->second != kvp.second)) {
if ((pos == rhs.end()) || (*pos != kvp)) {
return false;
}
}

View File

@ -292,7 +292,7 @@ namespace boost {
return (lhs.size() == rhs.size()) && ([&] {
for (auto const& key : lhs) {
auto pos = rhs.find(key);
if (pos != rhs.end() && (key != *pos)) {
if ((pos == rhs.end()) || (key != *pos)) {
return false;
}
}