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(); `

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

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);

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.

Parameters

Name

Description

rhs

The test allocator whose mechanism is shared.

Created with MrDocs