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.

Synopsis

Declared in <bslalg_constructorproxy.h>

template<class OBJECT_TYPE>
class ConstructorProxy;

Type Aliases

Name

Description

ValueType

Alias for the proxied OBJECT_TYPE.

allocator_type

Minimally picky allocator type that can be used to construct a ConstructorProxy. Choose bsl::polymorphic_allocator If OBJECT_TYPE is not AA, bsl::allocator<char> if OBJECT_TYPE is legacy‐AA, and OBJECT_TYPE::allocator_type otherwise.

Member Functions

Name

Description

ConstructorProxy [constructor]

Constructors

~ConstructorProxy [destructor]

Destroy this proxy and the object held by this proxy.

object

object overloads

Created with MrDocs