bsl::queue::queue

Constructors

Synopses

Declared in <bslstl_queue.h>

Create an empty queue having a container of the parameterized CONTAINER type.

explicit
queue();
» more...

Create a queue having the value of the specified original.

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

Create a queue having the same sequence of values as the specified container. The allocator associated with container (if any) is propagated for use in the new queue. container is left in valid but unspecified state.

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

Create a queue having the value of the specified original. The allocator associated with original (if any) is propagated for use in the new queue. original is left in valid but unspecified state.

queue(BloombergLP::bslmf::MovableRef<queue> container);
» more...

Create a queue having the specified container that holds elements of the parameterized VALUE type.

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

Create a queue passing the specified first and last to the constructor of the underlying container. Optionally specify an allocator used to supply memory. If allocator is not specified, a default-constructed object of the (template parameter) type ALLOCATOR is used.

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

Create a queue from the elements of the specifed range. Optionally specify an allocator used to supply memory. If allocator is not specified, a default-constructed object of the (template parameter) type t_ALLOCATOR is used. Note that range must meet the requirements of an input range and the values from range must have a type matching or convertible to (template parameter) VALUE.

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

Create an empty queue. This queue object uses the specified basicAllocator to supply memory. Note that the ALLOCATOR parameter type has to be convertible to the allocator of the CONTAINER parameter type, CONTAINER::allocator_type; otherwise, this constructor is disabled.

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

Create a queue whose underlying container has the value of the specified container (on entry) and uses basicAllocator to supply memory. The allocated-extended move constructor of CONTAINER is used to create the new queue. container is left in a valid but unspecified state. Note that a bslma::Allocator * can be supplied for basicAllocator if the (template parameter) ALLOCATOR is bsl::allocator (the default). Also note that this method assumes that CONTAINER has a move constructor. Also note that if CONTAINER::allocator_type does not exist, this constructor is disabled.

template<class ALLOCATOR>
queue(
    BloombergLP::bslmf::MovableRef<CONTAINER> container,
    ALLOCATOR const& basicAllocator,
    ALLOCATOR* = 0)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
» more...

Create a queue having the value of the specified original (on entry), that uses basicAllocator to supply memory. The allocator-extended move constructor of CONTAINER is used to create the new queue. original is left in a valid but unspecified state. Note that a bslma::Allocator * can be supplied for basicAllocator if the (template parameter) ALLOCATOR is bsl::allocator (the default). Also note that this method assumes that CONTAINER has a move constructor. Also note that if CONTAINER::allocator_type does not exist, this constructor is disabled.

template<class ALLOCATOR>
queue(
    BloombergLP::bslmf::MovableRef<queue> original,
    ALLOCATOR const& basicAllocator,
    ALLOCATOR* = 0)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
» more...

Create a queue having the same sequence of values as the specified container. The queue object uses the specified basicAllocator to obtain memory. Note that the ALLOCATOR parameter type has to be convertible to the allocator of the CONTAINER parameter type, CONTAINER::allocator_type; otherwise, this constructor is disabled.

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

Create a queue having the value of the specified original that will use the specified basicAllocator to supply memory. Note that the ALLOCATOR parameter type has to be convertible to the allocator of the CONTAINER parameter type, CONTAINER::allocator_type. Otherwise this constructor is disabled.

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

Same as the preceding overload.

template<
    class INPUT_ITER,
    class ALLOCATOR>
queue(
    INPUT_ITER first,
    INPUT_ITER last,
    ALLOCATOR const& allocator,
    ALLOCATOR* = 0)
requires bsl::uses_allocator<CONTAINER, ALLOCATOR>::value;
» more...

Same as the preceding overload.

template<
    class t_RANGE,
    class t_ALLOCATOR>
queue(
    std::from_range_t,
    t_RANGE&& range,
    t_ALLOCATOR const& allocator,
    t_ALLOCATOR* = 0)
requires bsl::uses_allocator<CONTAINER,t_ALLOCATOR>::value;
» more...