[#BloombergLP-bslma-StdTestAllocator-2constructor-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslma.adoc[bslma]::xref:BloombergLP/bslma/StdTestAllocator.adoc[StdTestAllocator]::StdTestAllocator
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bslma&lowbar;stdtestallocator&period;h&gt;`

TBD&colon; fix comment to mention that the default allocator has to be a test allocator&period; Create a proxy object which will forward allocation calls to the object pointed to by `bslma&colon;&colon;Default&colon;&colon;defaultAllocator()`&period; Postcondition&colon; &grave; this&hyphen;&gt;mechanism() &equals;&equals; bslma&colon;&colon;Default&colon;&colon;defaultAllocator()&semi; &grave;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslma/StdTestAllocator/2constructor-06.adoc[StdTestAllocator]();
----

[.small]#xref:BloombergLP/bslma/StdTestAllocator/2constructor-06.adoc[_» more&period;&period;&period;_]#

Create a proxy object using the same mechanism as the specified `original`&period; Postcondition&colon; `this&hyphen;&gt;mechanism() &equals;&equals; rhs&period;mechanism()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslma/StdTestAllocator/2constructor-0c.adoc[StdTestAllocator](xref:BloombergLP/bslma/StdTestAllocator.adoc[StdTestAllocator] const& original);
----

[.small]#xref:BloombergLP/bslma/StdTestAllocator/2constructor-0c.adoc[_» more&period;&period;&period;_]#

Create a proxy object sharing the same mechanism object as the specified `rhs`&period; The newly constructed test allocator will compare equal to `rhs`, even though they are instantiated on different types&period; Postcondition&colon; `this&hyphen;&gt;mechanism() &equals;&equals; rhs&period;mechanism()`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ANY&lowbar;TYPE&gt;
xref:BloombergLP/bslma/StdTestAllocator/2constructor-04.adoc[StdTestAllocator](xref:BloombergLP/bslma/StdTestAllocator.adoc[StdTestAllocator&lt;ANY&lowbar;TYPE&gt;] const& rhs);
----

[.small]#xref:BloombergLP/bslma/StdTestAllocator/2constructor-04.adoc[_» more&period;&period;&period;_]#

TBD&colon; fix comment to mention that `mechanism` has to be a test allocator&period; Convert a `bslma&colon;&colon;Allocator` pointer to an test allocator object which forwards allocation calls to the object pointed to by the specified `mechanism`&period; If `mechanism` is 0, then the currently installed default allocator is used instead&period; Postcondition&colon; `0 &equals;&equals; mechanism &verbar;&verbar; this&hyphen;&gt;mechanism() &equals;&equals; mechanism`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslma/StdTestAllocator/2constructor-0e.adoc[StdTestAllocator](xref:BloombergLP/bslma/Allocator.adoc[Allocator]* mechanism);
----

[.small]#xref:BloombergLP/bslma/StdTestAllocator/2constructor-0e.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rhs*
| The test allocator whose mechanism is shared&period;
|===


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