Constructors
Synopses
Declared in <bslstl_stack.h>
Create an empty stack.
explicit
stack();
Create a stack having the value of the specified original.
Create a stack by moving from the specified container.
explicit
stack(BloombergLP::bslmf::MovableRef<CONTAINER> container);
Create a stack by moving from the specified original.
stack(BloombergLP::bslmf::MovableRef<stack> original);
Create a stack whose underlying container has the value of the specified container.
explicit
stack(CONTAINER const& container);
Create an empty stack using the specified basicAllocator.
template<class ALLOCATOR>
explicit
stack(ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a stack from the range [first, last)].
template<class INPUT_ITER>
stack(
INPUT_ITER first,
INPUT_ITER last);
Create a stack from the elements of the specified range.
template<class t_RANGE>
stack(
std::from_range_t tag,
t_RANGE&& range);
Create a stack by moving from container using basicAllocator.
template<class ALLOCATOR>
stack(
BloombergLP::bslmf::MovableRef<CONTAINER> container,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a stack by moving from original using basicAllocator.
template<class ALLOCATOR>
stack(
BloombergLP::bslmf::MovableRef<stack> original,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a stack from container using basicAllocator.
template<class ALLOCATOR>
stack(
CONTAINER const& container,
ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Create a stack from original using basicAllocator.
Same as the related overload above for stack.
template<
class INPUT_ITER,
class ALLOCATOR>
stack(
INPUT_ITER first,
INPUT_ITER last,
ALLOCATOR const& allocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
Same as the preceding overload.
template<
class t_RANGE,
class t_ALLOCATOR>
stack(
std::from_range_t tag,
t_RANGE&& range,
t_ALLOCATOR const& allocator)
requires bsl::uses_allocator<CONTAINER,t_ALLOCATOR>::value;
Parameters
Name |
Description |
original |
stack whose value is copied |
container |
underlying container to move from |
basicAllocator |
allocator used to supply memory |
first |
beginning of the input range |
last |
end of the input range |
tag |
disambiguation tag for range construction |
range |
range of elements used to initialize this stack |
allocator |
allocator used to supply memory |
Created with MrDocs