BloombergLP::bslalg::ConstructorProxy

Proxy for constructing and destroying an optionally allocator-aware object.

Synopsis

Declared in <bslalg_constructorproxy.h>

template<class OBJECT_TYPE>
class ConstructorProxy;

Description

This class acts as a proxy for constructing and destroying an object of parameterized OBJECT_TYPE, where OBJECT_TYPE may or may not use a bslma allocator for supplying memory. The constructors for this proxy class take a bslma::Allocator *. If OBJECT_TYPE has the bslma::UsesBslmaAllocator trait declared, then the supplied allocator will be used to construct the proxied object. Otherwise, the allocator is ignored.

Type Aliases

NameDescription
ValueType Alias for the proxied OBJECT_TYPE.
allocator_type Allocator type used to construct this proxy.

Member Functions

NameDescription
ConstructorProxy [constructor]Constructors
~ConstructorProxy [destructor]Destroy this proxy and the object held by this proxy.
object object overloads