BloombergLP::bslma::operator==

Return true if the specified lhs and rhs are proxies for the same bslma::TestAllocator object.

Synopsis

Declared in <bslma_stdtestallocator.h>

template<
    class T1,
    class T2>
bool
operator==(
    StdTestAllocator<T1> const& lhs,
    StdTestAllocator<T2> const& rhs);

Description

Return true if the specified lhs and rhs are proxies for the same bslma::TestAllocator object. This is a practical implementation of the STL requirement that two allocators compare equal if and only if memory allocated from one can be deallocated from the other. Note that the two allocators need not be instantiated on the same type in order to compare equal.

Return Value

true if lhs and rhs share the same mechanism object.

Parameters

NameDescription
lhsThe left-hand test allocator operand.
rhsThe right-hand test allocator operand.