共用方式為


hash_map Members

Reference

Constructors

hash_map

Constructs a hash_map that is empty or that is a copy of all or part of some other hash_map.

Typedefs

allocator_type

A type that represents the allocator class for the hash_map object.

const_iterator

A type that provides a bidirectional iterator that can read a const element in the hash_map.

const_pointer

A type that provides a pointer to a const element in a hash_map.

const_reference

A type that provides a reference to a const element stored in a hash_map for reading and performing const operations.

const_reverse_iterator

A type that provides a bidirectional iterator that can read any const element in the hash_map.

difference_type

A signed integer type that can be used to represent the number of elements of a hash_map in a range between elements pointed to by iterators.

iterator

A type that provides a bidirectional iterator that can read or modify any element in a hash_map.

key_compare

A type that provides a function object that can compare two sort keys to determine the relative order of two elements in the hash_map.

key_type

A type describes the sort key object that constitutes each element of the hash_map.

mapped_type

A type that represents the data type stored in a hash_map.

pointer

A type that provides a pointer to an element in a hash_map.

reference

A type that provides a reference to an element stored in a hash_map.

reverse_iterator

A type that provides a bidirectional iterator that can read or modify an element in a reversed hash_map.

size_type

An unsigned integer type that can represent the number of elements in a hash_map.

value_type

A type that provides a function object that can compare two elements as sort keys to determine their relative order in the hash_map.

Member Functions

hash_map::at

Finds an element in a hash_map with a specified key value.

begin

Returns an iterator addressing the first element in the hash_map.

hash_map::cbegin

Returns a const iterator addressing the first element in the hash_map.

hash_map::cend

Returns a const iterator that addresses the location succeeding the last element in a hash_map.

clear

Erases all the elements of a hash_map.

count

Returns the number of elements in a hash_map whose key matches a parameter-specified key.

hash_map::crbegin

Returns a const iterator addressing the first element in a reversed hash_map.

hash_map::crend

Returns a const iterator that addresses the location succeeding the last element in a reversed hash_map.

hash_map::emplace

Inserts an element constructed in place into a hash_map.

hash_map::emplace_hint

Inserts an element constructed in place into a hash_map, with a placement hint.

empty

Tests if a hash_map is empty.

end

Returns an iterator that addresses the location succeeding the last element in a hash_map.

equal_range

Returns a pair of iterators, respectively, to the first element in a hash_map with a key that is greater than a specified key and to the first element in the hash_map with a key that is equal to or greater than the key.

erase

Removes an element or a range of elements in a hash_map from specified positions

find

Returns an iterator addressing the location of an element in a hash_map that has a key equivalent to a specified key.

get_allocator

Returns a copy of the allocator object used to construct the hash_map.

insert

Inserts an element or a range of elements into a hash_map.

key_comp

Returns an iterator to the first element in a hash_map with a key value that is equal to or greater than that of a specified key.

lower_bound

Returns an iterator to the first element in a hash_map with a key value that is equal to or greater than that of a specified key.

max_size

Returns the maximum length of the hash_map.

rbegin

Returns an iterator addressing the first element in a reversed hash_map.

rend

Returns an iterator that addresses the location succeeding the last element in a reversed hash_map.

size

Returns the number of elements in the hash_map.

swap

Exchanges the elements of two hash_maps.

upper_bound

Returns an iterator to the first element in a hash_map that with a key value that is greater than that of a specified key.

value_comp

Retrieves a copy of the comparison object used to order element values in a hash_map.

Operators

operator[]

Inserts an element into a hash_map with a specified key value.

hash_map::operator=

Replaces the elements of a hash_map with a copy of another hash_map.

See Also

Reference

hash_map Class

Thread Safety in the Standard C++ Library

Standard Template Library