bsl::stack::stack

Constructors

Synopses

Declared in <bslstl_stack.h>

Create an empty stack.

explicit
stack();
» more...

Create a stack having the value of the specified original.

stack(stack const& original);
» more...

Create a stack by moving from the specified container.

explicit
stack(BloombergLP::bslmf::MovableRef<CONTAINER> container);
» more...

Create a stack by moving from the specified original.

stack(BloombergLP::bslmf::MovableRef<stack> original);
» more...

Create a stack whose underlying container has the value of the specified container.

explicit
stack(CONTAINER const& container);
» more...

Create an empty stack using the specified basicAllocator.

template<class ALLOCATOR>
explicit
stack(ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
» more...

Create a stack from the range [first, last)].

template<class INPUT_ITER>
stack(
    INPUT_ITER first,
    INPUT_ITER last);
» more...

Create a stack from the elements of the specified range.

template<class t_RANGE>
stack(
    std::from_range_t tag,
    t_RANGE&& range);
» more...

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;
» more...

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;
» more...

Create a stack from container using basicAllocator.

template<class ALLOCATOR>
stack(
    CONTAINER const& container,
    ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
» more...

Create a stack from original using basicAllocator.

template<class ALLOCATOR>
stack(
    stack const& original,
    ALLOCATOR const& basicAllocator)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
» more...

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;
» more...

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;
» more...

Parameters

NameDescription
originalstack whose value is copied
containerunderlying container to move from
basicAllocatorallocator used to supply memory
firstbeginning of the input range
lastend of the input range
tagdisambiguation tag for range construction
rangerange of elements used to initialize this stack
allocatorallocator used to supply memory