BloombergLP::bslma::TestAllocator_Proxy

Proxy for a test allocator used by exception-test macros.

Synopsis

Declared in <bslma_testallocator.h>

template<class BSLMA_ALLOC_TYPE>
class TestAllocator_Proxy
    : public TestAllocator_ProxyBase

Description

This class provides a proxy to the test allocator that is supplied to the BSLMA_TESTALLOCATOR_EXCEPTION_TEST_BEGIN macro. This proxy may be instantiated with TestAllocator, or with a type that supports the same interface as TestAllocator.

Base Classes

NameDescription
TestAllocator_ProxyBaseCommon base class for TestAllocator_Proxy.

Member Functions

NameDescription
TestAllocator_Proxy [constructor]Create a proxy for the specified allocator used by the exception test macros.
~TestAllocator_Proxy [destructor] [virtual]Destroy this proxy object.
setAllocationLimit [virtual]Set the allocation limit on the proxied test allocator.

Non-Member Functions

NameDescription
TestAllocator_getProxyReturn, by value, a test allocator proxy for the specified parameterized allocator.