Constructors

Synopses

Declared in <bdlc_flathashmap.h>

Create an empty FlatHashMap object.

Create an empty map with at least the specified capacity.

explicit
FlatHashMap(std::size_t capacity);

Create a map by moving from the specified original object.

Create an empty map using the specified basicAllocator.

explicit
FlatHashMap(bslma::Allocator* basicAllocator);

Create an empty map with at least the specified capacity.

FlatHashMap(
    std::size_t capacity,
    bslma::Allocator* basicAllocator);

Create a map by moving from original using basicAllocator.

Create a map populated from the specified values initializer list.

FlatHashMap(
    bsl::initializer_list<value_type> values,
    bslma::Allocator* basicAllocator = 0);

Create a map with the same value as the specified original object.

FlatHashMap(
    FlatHashMap const& original,
    bslma::Allocator* basicAllocator = 0);

Create an empty map with at least the specified capacity and hash.

FlatHashMap(
    std::size_t capacity,
    HASH const& hash,
    bslma::Allocator* basicAllocator = 0);

Same as the preceding overload, also requesting at least the specified capacity.

FlatHashMap(
    bsl::initializer_list<value_type> values,
    std::size_t capacity,
    bslma::Allocator* basicAllocator = 0);

Create a map populated from the [first, last)] iterator range.

template<class INPUT_ITERATOR>
FlatHashMap(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    bslma::Allocator* basicAllocator = 0);

Create an empty map with the specified capacity, hash, and equal.

FlatHashMap(
    std::size_t capacity,
    HASH const& hash,
    EQUAL const& equal,
    bslma::Allocator* basicAllocator = 0);

Same as the preceding overload, also using the specified hash.

FlatHashMap(
    bsl::initializer_list<value_type> values,
    std::size_t capacity,
    HASH const& hash,
    bslma::Allocator* basicAllocator = 0);

Same as the preceding overload, also requesting at least the specified capacity.

template<class INPUT_ITERATOR>
FlatHashMap(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    std::size_t capacity,
    bslma::Allocator* basicAllocator = 0);

Same as the preceding overload, also using the specified equal.

FlatHashMap(
    bsl::initializer_list<value_type> values,
    std::size_t capacity,
    HASH const& hash,
    EQUAL const& equal,
    bslma::Allocator* basicAllocator = 0);

Same as the preceding overload, also using the specified hash.

template<class INPUT_ITERATOR>
FlatHashMap(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    std::size_t capacity,
    HASH const& hash,
    bslma::Allocator* basicAllocator = 0);

Same as the preceding overload, also using the specified equal.

template<class INPUT_ITERATOR>
FlatHashMap(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last,
    std::size_t capacity,
    HASH const& hash,
    EQUAL const& equal,
    bslma::Allocator* basicAllocator = 0);

Parameters

Name

Description

capacity

minimum initial capacity of the underlying array

original

map to move from

basicAllocator

allocator used to supply memory

values

initializer list of key/value pairs to insert

hash

hash functor used for keys

first

beginning of the input range

last

end of the input range (exclusive)

equal

key‐equality predicate

Created with MrDocs