forked from boostorg/unordered
Fixup implementation of equality operator
This commit is contained in:
1 parent
1fa823d815
commit
2907083b73
2 files changed
+2
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user