mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 15:31:09 +08:00
libstdc++: Make allocator equality comparable in tests
libstdc++-v3/ChangeLog: * testsuite/23_containers/unordered_map/cons/default.cc: Add equality comparison operators to allocator. * testsuite/23_containers/unordered_set/cons/default.cc: Likewise.
This commit is contained in:
parent
527a1cf32c
commit
2eff2a3cb5
@ -18,6 +18,9 @@ template<typename T>
|
||||
|
||||
void deallocate(T *p, std::size_t n)
|
||||
{ std::allocator<T>().deallocate(p, n); }
|
||||
|
||||
bool operator==(const NoDefaultConsAlloc&) const { return true; }
|
||||
bool operator!=(const NoDefaultConsAlloc&) const { return false; }
|
||||
};
|
||||
|
||||
using Map = std::unordered_map<int, int, std::hash<int>, std::equal_to<int>,
|
||||
|
@ -18,6 +18,9 @@ template<typename T>
|
||||
|
||||
void deallocate(T *p, std::size_t n)
|
||||
{ std::allocator<T>().deallocate(p, n); }
|
||||
|
||||
bool operator==(const NoDefaultConsAlloc&) const { return true; }
|
||||
bool operator!=(const NoDefaultConsAlloc&) const { return false; }
|
||||
};
|
||||
|
||||
using Set = std::unordered_set<int, std::hash<int>, std::equal_to<int>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user