In §23.2.7 Unordered associative containers [unord.req] of the C++ standard table 91 describes the additional requirements a STL unordered associative container must meet. In this table the standard dictates that the STL unordered containers (i.e., unordered_set
, unordered_map
, unordered_multiset
and unordered_multimap
) must provide as member types local_iterator
and const_local_iterator
.
local_iterator
is an iterator type whose category, value, difference, pointer and reference types are the same as the unordered container'siterator
. This iterator can be used to iterate through a single bucket but not across buckets.const_local_iterator
is an iterator type whose category, value, difference, pointer and reference types are the same as the unordered container'sconst_iterator
. This iterator can be used to iterate through a single bucket but not across buckets.
Q
What are some uses for these iterators?