std::_Hashtable< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >(3cxx) | std::_Hashtable< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >(3cxx) |
NAME¶
std::_Hashtable< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits > -SYNOPSIS¶
Inherits std::__detail::_Hashtable_base< _Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, _Traits >, std::__detail::_Map_base< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >, std::__detail::_Insert< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >, std::__detail::_Rehash_base< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >, std::__detail::_Equality< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >, and std::__detail::_Hashtable_alloc< __alloctr_rebind< _Alloc, __detail::_Hash_node< _Value, _Traits::__hash_cached::value > >::__type >.Public Types¶
typedef _Alloc allocator_type
Protected Member Functions¶
const _Equal & _M_eq () const
Private Types¶
using __bucket_alloc_traits = std::allocator_traits< __bucket_alloc_type >
Private Member Functions¶
__bucket_type * _M_allocate_buckets (std::size_t __n)
Detailed Description¶
template<typename _Key, typename _Value, typename _Alloc, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename _Hash, typename _RehashPolicy, typename _Traits>singleton std::_Hashtable< _Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, _Traits >¶
Primary class template _Hashtable. Template Parameters:_Value CopyConstructible type.
_Key CopyConstructible type.
_Alloc An allocator type ([lib.allocator.requirements]) whose
_Alloc::value_type is _Value. As a conforming extension, we allow for
_Alloc::value_type != _Value.
_ExtractKey Function object that takes an object of type _Value and
returns a value of type _Key.
_Equal Function object that takes two objects of type k and returns a
bool-like value that is true if the two objects are considered equal.
_H1 The hash function. A unary function object with argument type _Key
and result type size_t. Return values should be distributed over the entire
range [0, numeric_limits<size_t>:max()].
_H2 The range-hashing function (in the terminology of Tavori and
Dreizin). A binary function object whose argument types and result type are
all size_t. Given arguments r and N, the return value is in the range [0, N).
_Hash The ranged hash function (Tavori and Dreizin). A binary function
whose argument types are _Key and size_t and whose result type is size_t.
Given arguments k and N, the return value is in the range [0, N). Default:
hash(k, N) = h2(h1(k), N). If _Hash is anything other than the default, _H1
and _H2 are ignored.
_RehashPolicy Policy class with three members, all of which govern the
bucket count. _M_next_bkt(n) returns a bucket count no smaller than n.
_M_bkt_for_elements(n) returns a bucket count appropriate for an element count
of n. _M_need_rehash(n_bkt, n_elt, n_ins) determines whether, if the current
bucket count is n_bkt and the current element count is n_elt, we need to
increase the bucket count. If so, returns make_pair(true, n), where n is the
new bucket count. If not, returns make_pair(false, <anything>)
_Traits Compile-time class with three boolean std::integral_constant
members: __cache_hash_code, __constant_iterators, __unique_keys.
Each _Hashtable data structure has:
- •
- _Bucket[] _M_buckets
- •
- _Hash_node_base _M_before_begin
- •
- size_type _M_bucket_count
- •
- size_type _M_element_count
- •
- _Hash_node* _M_next
- •
- Tp _M_value
- •
- size_t _M_hash_code if cache_hash_code is true
- •
- std::forward_list<_Node> containing the elements
- •
- std::vector<std::forward_list<_Node>::iterator> representing the buckets
- •
- __detail::_Hashtable_base
- •
- __detail::_Map_base
- •
- __detail::_Insert
- •
- __detail::_Rehash_base
- •
- __detail::_Equality
Author¶
Generated automatically by Doxygen for libstdc++ from the source code.Wed Jan 31 2018 | libstdc++ |