Create a proxy that forwards to the specified mechanism.

Synopsis

Declared in <bslma_stdtestallocator.h>

StdTestAllocator(Allocator* mechanism);

Description

Convert a bslma::Allocator pointer to a test allocator object which forwards allocation calls to the object pointed to by the specified mechanism. The mechanism must be a bslma::TestAllocator (or a type derived from it), or 0. If mechanism is 0, then the currently installed default allocator is used instead. Postcondition: 0 == mechanism || this‐>mechanism() == mechanism.

Parameters

Name

Description

mechanism

The test allocator used as the allocation mechanism.

Created with MrDocs