diff options
author | bogdan <[email protected]> | 2015-08-29 01:15:12 +0300 |
---|---|---|
committer | bogdan <[email protected]> | 2015-08-29 01:15:12 +0300 |
commit | 937426a903c2199fb677082f92038b14dc0b519e (patch) | |
tree | bf44f4825888506856021abba494c873cfac976c | |
parent | 7677f329b5f8b4976d2c858c31a6e48d31d2db9c (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.
-rw-r--r-- | src/lib/alloc/secmem.h | 8 |
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>>; |