BloombergLP::bslma::StdTestAllocator::StdTestAllocator

Constructors

Synopses

Declared in <bslma_stdtestallocator.h>

TBD: fix comment to mention that the default allocator has to be a test allocator. Create a proxy object which will forward allocation calls to the object pointed to by bslma::Default::defaultAllocator(). Postcondition: ` this->mechanism() == bslma::Default::defaultAllocator(); `

StdTestAllocator();
» more...

Create a proxy object using the same mechanism as the specified original. Postcondition: this->mechanism() == rhs.mechanism().

StdTestAllocator(StdTestAllocator const& original);
» more...

Create a proxy object sharing the same mechanism object as the specified rhs. The newly constructed test allocator will compare equal to rhs, even though they are instantiated on different types. Postcondition: this->mechanism() == rhs.mechanism().

template<class ANY_TYPE>
StdTestAllocator(StdTestAllocator<ANY_TYPE> const& rhs);
» more...

TBD: fix comment to mention that mechanism has to be a test allocator. Convert a bslma::Allocator pointer to an test allocator object which forwards allocation calls to the object pointed to by the specified mechanism. If mechanism is 0, then the currently installed default allocator is used instead. Postcondition: 0 == mechanism || this->mechanism() == mechanism.

StdTestAllocator(Allocator* mechanism);
» more...

Parameters

NameDescription
rhsThe test allocator whose mechanism is shared.