aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbogdan <[email protected]>2015-08-29 01:15:12 +0300
committerbogdan <[email protected]>2015-08-29 01:15:12 +0300
commit937426a903c2199fb677082f92038b14dc0b519e (patch)
treebf44f4825888506856021abba494c873cfac976c /src
parent7677f329b5f8b4976d2c858c31a6e48d31d2db9c (diff)
Make the equality operators standard-compliant.
The equality operators need to support different specializations as well; this is also part of the standard allocator requirements.
Diffstat (limited to 'src')
-rw-r--r--src/lib/alloc/secmem.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/alloc/secmem.h b/src/lib/alloc/secmem.h
index 453acc5d8..63d4e5296 100644
--- a/src/lib/alloc/secmem.h
+++ b/src/lib/alloc/secmem.h
@@ -85,12 +85,12 @@ class secure_allocator
template<typename U> void destroy(U* p) { p->~U(); }
};
-template<typename T> inline bool
-operator==(const secure_allocator<T>&, const secure_allocator<T>&)
+template<typename T, typename U> inline bool
+operator==(const secure_allocator<T>&, const secure_allocator<U>&)
{ return true; }
-template<typename T> inline bool
-operator!=(const secure_allocator<T>&, const secure_allocator<T>&)
+template<typename T, typename U> inline bool
+operator!=(const secure_allocator<T>&, const secure_allocator<U>&)
{ return false; }
template<typename T> using secure_vector = std::vector<T, secure_allocator<T>>;