[#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 `<bslma_stdtestallocator.h>` TBD: fix comment to mention that the default allocator has to be a test allocator. Create a proxy object which will forward allocation calls to the object pointed to by `bslma::Default::defaultAllocator()`. Postcondition: ` this‐>mechanism() == bslma::Default::defaultAllocator(); ` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslma/StdTestAllocator/2constructor-06.adoc[StdTestAllocator](); ---- [.small]#xref:BloombergLP/bslma/StdTestAllocator/2constructor-06.adoc[_» more..._]# Create a proxy object using the same mechanism as the specified `original`. Postcondition: `this‐>mechanism() == rhs.mechanism()`. [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..._]# Create a proxy object sharing the same mechanism object as the specified `rhs`. The newly constructed test allocator will compare equal to `rhs`, even though they are instantiated on different types. Postcondition: `this‐>mechanism() == rhs.mechanism()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ANY_TYPE> xref:BloombergLP/bslma/StdTestAllocator/2constructor-04.adoc[StdTestAllocator](xref:BloombergLP/bslma/StdTestAllocator.adoc[StdTestAllocator<ANY_TYPE>] const& rhs); ---- [.small]#xref:BloombergLP/bslma/StdTestAllocator/2constructor-04.adoc[_» more..._]# TBD: fix comment to mention that `mechanism` has to be a test allocator. Convert a `bslma::Allocator` pointer to an test allocator object which forwards allocation calls to the object pointed to by the specified `mechanism`. If `mechanism` is 0, then the currently installed default allocator is used instead. Postcondition: `0 == mechanism || this‐>mechanism() == mechanism`. [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..._]# == Parameters [cols="1,4"] |=== | Name| Description | *rhs* | The test allocator whose mechanism is shared. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#