From dbba786a35f96c7825c715ea90481a9e8020fcc5 Mon Sep 17 00:00:00 2001 From: LeonineKing1199 Date: Thu, 18 Nov 2021 10:24:57 -0800 Subject: [PATCH] Add missing const-qualification for `operator==` member functions --- test/unordered/deduction_tests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unordered/deduction_tests.cpp b/test/unordered/deduction_tests.cpp index 673c0609..cffb0c1d 100644 --- a/test/unordered/deduction_tests.cpp +++ b/test/unordered/deduction_tests.cpp @@ -30,8 +30,8 @@ template struct test_allocator template test_allocator(test_allocator 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