bsl::map::map

Constructors

Synopses

Declared in <bslstl_map.h>

Create an empty map.

map();
» more...

Create a map with the same value as original.

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

Create a map by moving from original.

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

Create an empty map that uses basicAllocator.

explicit
map(ALLOCATOR const& basicAllocator);
» more...

Create a map by moving from original using basicAllocator.

map(
    BloombergLP::bslmf::MovableRef<map> original,
    ALLOCATOR const& basicAllocator);
» more...

Create a map from values using basicAllocator.

map(
    std::initializer_list<value_type> values,
    ALLOCATOR const& basicAllocator);
» more...

Create an empty map using comparator and basicAllocator.

explicit
map(
    COMPARATOR const& comparator,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a map with the value of original using basicAllocator.

map(
    map const& original,
    ALLOCATOR const& basicAllocator);
» more...

Create a map from values, optionally with comparator and allocator.

map(
    std::initializer_list<value_type> values,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a map from [first, last)] using basicAllocator.

template<class INPUT_ITERATOR>
map(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    ALLOCATOR const& basicAllocator);
» more...

Create a map from range using basicAllocator.

template<class RANGE>
map(
    std::from_range_t tag,
    RANGE&& range,
    ALLOCATOR const& basicAllocator);
» more...

Create a map from [first, last)], optionally with comparator and allocator.

template<class INPUT_ITERATOR>
map(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Create a map from range, optionally with comparator and allocator.

template<class RANGE>
map(
    std::from_range_t tag,
    RANGE&& range,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
» more...

Parameters

NameDescription
originalmap to copy
basicAllocatorallocator used to supply memory
valuesinitializer list of elements to insert
comparatorfunctor used to order keys
firstbeginning of the range to copy
lastend of the range to copy
tagdisambiguation tag for range construction
rangeinput range of elements to insert