[#BloombergLP-bslalg-ConstructorProxy_PolymorphicAllocator]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::ConstructorProxy&lowbar;PolymorphicAllocator
:relfileprefix: ../../
:mrdocs:

Wrapper around `bsl&colon;&colon;polymorphic&lowbar;allocator` that can tolerate being constructed with a null pointer&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE = bsl::polymorphic&lowbar;allocator&lt;&gt;::value&lowbar;type&gt;
class ConstructorProxy&lowbar;PolymorphicAllocator
    : public xref:bsl/polymorphic_allocator.adoc[bsl::polymorphic&lowbar;allocator&lt;TYPE&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/polymorphic_allocator.adoc[bsl::polymorphic&lowbar;allocator&lt;TYPE&gt;]`
| Alias for `std&colon;&colon;pmr&colon;&colon;polymorphic&lowbar;allocator` in the `bsl` namespace&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslalg/ConstructorProxy_PolymorphicAllocator/2constructor-08.adoc[`ConstructorProxy&lowbar;PolymorphicAllocator`]         [.small]#[constructor]#
| Construct from the address of a `memory&lowbar;resource` optionally specified by `r`&period; If `r` is null or not specified, construct from the default allocator&period;
| xref:BloombergLP/bslalg/ConstructorProxy_PolymorphicAllocator/2constructor-0c.adoc[`ConstructorProxy&lowbar;PolymorphicAllocator`]         [.small]#[constructor]#
| Create an allocator using the same `memory&lowbar;resource` as the specified `other` allocator&period;
| xref:BloombergLP/bslalg/ConstructorProxy_PolymorphicAllocator/2conversion-05.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ConstructorProxy&lowbar;PolymorphicAllocator, IsStdAllocator&gt;`] 
| Declare that `ConstructorProxy&lowbar;PolymorphicAllocator` is a standard allocator&period;
| xref:BloombergLP/bslalg/ConstructorProxy_PolymorphicAllocator/2conversion-03.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ConstructorProxy&lowbar;PolymorphicAllocator, UsesBslmaAllocator, false&gt;`] 
| Declare that `ConstructorProxy&lowbar;PolymorphicAllocator` does not use a `bslma` allocator when `false` is specified&period;
|===



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