Add missing const-qualification for operator== member functions

This commit is contained in:
LeonineKing1199
2021-11-18 10:24:57 -08:00
parent d0d4be9e35
commit dbba786a35

View File

@ -30,8 +30,8 @@ template <typename T> struct test_allocator
template <typename T2> test_allocator(test_allocator<T2> const&) {}
T* allocate(std::size_t n) const { return (T*)malloc(sizeof(T) * n); }
void deallocate(T* ptr, std::size_t) const { free(ptr); }
bool operator==(test_allocator const&) { return true; }
bool operator!=(test_allocator const&) { return false; }
bool operator==(test_allocator const&) const { return true; }
bool operator!=(test_allocator const&) const { return false; }
};
#endif