refactored to provide equality comparison from table_core

This commit is contained in:
joaquintides
2023-05-12 11:24:20 +02:00
parent bcf5d0cf13
commit 511e2b3272
8 changed files with 200 additions and 171 deletions
@@ -766,6 +766,25 @@ namespace boost {
hasher hash_function() const { return table_.hash_function(); }
key_equal key_eq() const { return table_.key_eq(); }
/// Equality
///
template <class Key, class Hash, class KeyEqual, class Allocator>
friend bool operator==(
concurrent_flat_map<Key, Hash, KeyEqual, Allocator> const& lhs,
concurrent_flat_map<Key, Hash, KeyEqual, Allocator> const& rhs)
{
return lhs.table_ == rhs.table_;
}
template <class Key, class Hash, class KeyEqual, class Allocator>
friend bool operator!=(
concurrent_flat_map<Key, Hash, KeyEqual, Allocator> const& lhs,
concurrent_flat_map<Key, Hash, KeyEqual, Allocator> const& rhs)
{
return !(lhs == rhs);
}
};
} // namespace unordered
} // namespace boost