[#BloombergLP-bslalg-ConstructorProxy]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::ConstructorProxy
:relfileprefix: ../../
:mrdocs:

Proxy for constructing and destroying an optionally allocator&hyphen;aware object&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;constructorproxy&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class OBJECT&lowbar;TYPE&gt;
class ConstructorProxy;
----

== Description

This class acts as a proxy for constructing and destroying an object of parameterized `OBJECT&lowbar;TYPE`, where `OBJECT&lowbar;TYPE` may or may not use a `bslma` allocator for supplying memory&period; The constructors for this proxy class take a `bslma&colon;&colon;Allocator &ast;`&period; If `OBJECT&lowbar;TYPE` has the `bslma&colon;&colon;UsesBslmaAllocator` trait declared, then the supplied allocator will be used to construct the proxied object&period; Otherwise, the allocator is ignored&period;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ConstructorProxy/ValueType.adoc[`ValueType`] 
| Alias for the proxied `OBJECT&lowbar;TYPE`&period;
| xref:BloombergLP/bslalg/ConstructorProxy/allocator_type.adoc[`allocator&lowbar;type`] 
| Allocator type used to construct this proxy&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ConstructorProxy/2constructor-02.adoc[`ConstructorProxy`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bslalg/ConstructorProxy/2destructor.adoc[`&#126;ConstructorProxy`] [.small]#[destructor]#
| Destroy this proxy and the object held by this proxy&period;
| xref:BloombergLP/bslalg/ConstructorProxy/object-0e.adoc[`object`] 
| `object` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
