Legacy STLPort hash container mapping unique keys to values.

Synopsis

Declared in <bslstp_hashmap.h>

template<
    class _Key,
    class _Tp,
    class _HashFcn = BloombergLP::bslstp::HashSelector<_Key>::Type,
    class _EqualKey = bsl::ComparatorSelector<_Key>::Type,
    class _Alloc = bsl::allocator<pair<_Key const, _Tp>>>
class hash_map;

Type Aliases

Name

Description

_value_type

Internal synonym for the element pair type.

allocator_type

Allocator type used by this map.

const_iterator

Iterator providing non‐modifiable access to elements.

const_pointer

Pointer to a non‐modifiable element.

const_reference

Reference to a non‐modifiable element.

data_type

Mapped value type (synonym for mapped_type).

difference_type

Signed integral type used for iterator distances.

hasher

Hash functor type.

iterator

Iterator providing modifiable access to elements.

key_equal

Key‐equality functor type.

key_type

Key type used by this container.

mapped_type

Type of the mapped value associated with each key.

pointer

Pointer to a modifiable element.

reference

Reference to a modifiable element.

size_type

Unsigned integral type used for sizes.

value_type

Element type stored in the map (pair<const key, mapped>).

Member Functions

Name

Description

hash_map [constructor]

Constructors

begin

begin overloads

bucket_count

Return the number of buckets in this container.

clear

Remove all elements from this map.

count

Return the number of elements matching the specified key.

elems_in_bucket

Return the number of elements in the specified bucket.

empty

Return true if this map contains no elements.

end

end overloads

equal_range

equal_range overloads

erase

erase overloads

find

find overloads

get_allocator

Return the allocator used by this map.

hash_funct

Return the hash functor used by this map.

insert

insert overloads

insert_noresize

Insert __obj without resizing the bucket vector if the key is new.

key_eq

Return the key‐equality functor used by this map.

max_bucket_count

Return the maximum number of buckets this container can use.

max_size

Return an upper bound on the number of elements this map can hold.

operator[]

Return a reference to the mapped value for __key, inserting a default‐constructed value if the key is absent.

resize

Rebuild the bucket vector using a size suggested by the specified hint.

size

Return the number of elements in this map.

swap

Exchange the contents of this map with those of the specified map.

Static Member Functions

Name

Description

_M_equal

Return true if the specified maps contain the same elements.

Non-Member Functions

Name

Description

operator!=

Return true if the specified hash maps do not contain the same elements.

operator==

Return true if the specified hash maps contain the same elements.

swap

Exchange the contents of the specified hash maps.

Created with MrDocs