refactor: Remove all operator!= definitions

The compiler can deduce `operator!=` from `operator==`.
This commit is contained in:
Daniel Pfeifer
2025-11-03 11:24:48 +01:00
parent 25c45bb0d0
commit 5a0f49bd26
14 changed files with 0 additions and 78 deletions

View File

@@ -352,11 +352,4 @@ bool operator==(const PoolAllocator<T1, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>& a,
return a.resource() == b.resource();
}
template <class T1, class T2, std::size_t MAX_BLOCK_SIZE_BYTES, std::size_t ALIGN_BYTES>
bool operator!=(const PoolAllocator<T1, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>& a,
const PoolAllocator<T2, MAX_BLOCK_SIZE_BYTES, ALIGN_BYTES>& b) noexcept
{
return !(a == b);
}
#endif // BITCOIN_SUPPORT_ALLOCATORS_POOL_H

View File

@@ -46,11 +46,6 @@ struct secure_allocator {
{
return true;
}
template <typename U>
friend bool operator!=(const secure_allocator&, const secure_allocator<U>&) noexcept
{
return false;
}
};
// This is exactly like std::string, but with a custom allocator.

View File

@@ -38,11 +38,6 @@ struct zero_after_free_allocator {
{
return true;
}
template <typename U>
friend bool operator!=(const zero_after_free_allocator&, const zero_after_free_allocator<U>&) noexcept
{
return false;
}
};
/** Byte-vector that clears its contents before deletion. */