Bucket interface¶
The types concurrent_unordered_set::local_iterator
and concurrent_unordered_set::const_local_iterator
meet the requirements
of ForwardIterator
from the [forward.iterators] ISO C++ Standard section.
Use these iterators to traverse the certain bucket.
All methods in this section can only be executed serially. The behavior is undefined in case of concurrent execution of these member functions with other (either concurrently safe) methods.
Bucket begin and bucket end¶
local_iterator unsafe_begin( size_type n ); const_local_iterator unsafe_begin( size_type n ) const; const_local_iterator unsafe_cbegin( size_type n ) const;Returns: an iterator to the first element in the bucket number
n
.
local_iterator unsafe_end( size_type n ); const_local_iterator unsafe_end( size_type n ) const; const_local_iterator unsafe_cend( size_type n ) const;Returns: an iterator to the element that follows the last element in the bucket number
n
.
The number of buckets¶
size_type unsafe_bucket_count() const;Returns: the number of buckets in the container.
size_type unsafe_max_bucket_count() const;Returns: the maximum number of buckets that container can hold.
Size of the bucket¶
size_type unsafe_bucket_size( size_type n ) const;Returns: the number of elements in the bucket number
n
.
Bucket number¶
size_type unsafe_bucket( const key_type& key ) const;Returns: the number of the bucket in which the element with the key
key
is stored.