[#bsl-stack-05-2constructor-0e2]
= xref:bsl.adoc[bsl]::xref:bsl/stack-05.adoc[stack]::stack
:relfileprefix: ../../
:mrdocs:

Create a stack whose underlying container has the value of the specified `container` (on entry) by moving the contents of `container` to the new stack&period; The allocator associated with `container` is propagated for use in the new stack&period; `container` is left in a valid but unspecified state&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;stack&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
stack(xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;CONTAINER&gt;] container);
----


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