Create a stack by moving from container using basicAllocator.
Declared in <bslstl_stack.h>
template<class ALLOCATOR>
stack(
BloombergLP::bslmf::MovableRef<CONTAINER> container,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a stack whose underlying container has the value of the specified container (on entry) that uses basicAllocator to supply memory by using the allocator-extended move constructor of CONTAINER. container' is left in a valid but unspecified state. A bslma::Allocator * can be supplied for basicAllocator if the (template parameter) ALLOCATOR is bsl::allocator (the default). This method assumes that CONTAINER has a move constructor. If CONTAINER::allocator_type does not exist, this constructor may not be used.
| Name | Description |
|---|---|
| container | underlying container to move from |
| basicAllocator | allocator used to supply memory |