Create a stack from container using basicAllocator.
Declared in <bslstl_stack.h>
template<class ALLOCATOR>
stack(
CONTAINER const& container,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a stack whose underlying container has the value of the specified container, and use the specified basicAllocator to supply memory. If CONTAINER::allocator_type does not exist, this constructor may not be used.
| Name | Description |
|---|---|
| container | underlying container whose contents initialize this stack |
| basicAllocator | allocator used to supply memory |