Manpages - std___detail__Hash_code_base.3

Table of Contents

NAME

std::__detail::_Hash_code_base< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >

SYNOPSIS


#include <hashtable_policy.h>

Inherits std::__detail::_Hashtable_ebo_helper< 1, _Hash >.

Inherited by std::__detail::_Hashtable_base< _Key, _Tp, equal_to< _Key >, allocator< std::pair< const _Key, _Tp > >, _Hash, _RangeHash, _Unused, _Traits >, and std::__detail::_Hashtable_base< _Value, hash< _Value >, allocator< _Value >, _Equal, _Hash, _RangeHash, _Unused, _Traits >.

Public Types

typedef _Hash hasher

Public Member Functions

hasher hash_function () const

Protected Types

typedef std::size_t __hash_code

Protected Member Functions

_Hash_code_base (const _Hash &__hash)

std::size_t _M_bucket_index (__hash_code __c, std::size_t __bkt_count) const

std::size_t _M_bucket_index (const _Hash_node_value< _Value, false > &__n, std::size_t __bkt_count) const noexcept(noexcept(declval< const _Hash & >()(declval< const _Key & >())) &&noexcept(declval< const _RangeHash & >()((__hash_code) 0,(std::size_t) 0)))

std::size_t _M_bucket_index (const _Hash_node_value< _Value, true > &__n, std::size_t __bkt_count) const noexcept(noexcept(declval< const _RangeHash & >()((__hash_code) 0,(std::size_t) 0)))

void _M_copy_code (*_Hash_node_code_cache*< false > &, const *_Hash_node_code_cache*< false > &) const

void _M_copy_code (*_Hash_node_code_cache*< true > &__to, const *_Hash_node_code_cache*< true > &__from) const

const _Hash & _M_hash () const

__hash_code _M_hash_code (const _Key &__k) const

template<typename _Kt > __hash_code _M_hash_code_tr (const _Kt &__k) const

void _M_store_code (*_Hash_node_code_cache*< false > &, __hash_code) const

void _M_store_code (*_Hash_node_code_cache*< true > &__n, __hash_code __c) const

void _M_swap (_Hash_code_base &__x)

Friends

struct _Local_iterator_base< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, false >

Detailed Description

“template<typename _Key, typename _Value, typename _ExtractKey,

typename _Hash, typename _RangeHash, typename _Unused, bool __cache_hash_code>
struct std::__detail::_Hash_code_base< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >“Primary class template _Hash_code_base.

Encapsulates two policy issues that aren’t quite orthogonal. (1) the difference between using a ranged hash function and using the combination of a hash function and a range-hashing function. In the former case we don’t have such things as hash codes, so we have a dummy type as placeholder. (2) Whether or not we cache hash codes. Caching hash codes is meaningless if we have a ranged hash function.

We also put the key extraction objects here, for convenience. Each specialization derives from one or more of the template parameters to benefit from Ebo. This is important as this type is inherited in some cases by the _Local_iterator_base type used to implement local_iterator and const_local_iterator. As with any iterator type we prefer to make it as small as possible.

Definition at line 1187 of file hashtable_policy.h.

Member Typedef Documentation

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> typedef std::size_t std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::__hash_code= [protected]= Definition at line *1205 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> typedef _Hash std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::hasher Definition at line *1198 of file hashtable_policy.h.

Constructor & Destructor Documentation

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::*_Hash_code_base (const _Hash & __hash)= [inline]=, = [protected]= Definition at line 1210 of file hashtable_policy.h.

Member Function Documentation

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> std::size_t std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_bucket_index (__hash_code __c, std::size_t __bkt_count) const= [inline]=, = [protected]= Definition at line *1230 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> std::size_t std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_bucket_index (const _Hash_node_value< _Value, false > & __n, std::size_t __bkt_count) const= [inline]=, = [protected]=, = [noexcept]= Definition at line *1234 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> std::size_t std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_bucket_index (const _Hash_node_value< _Value, true > & __n, std::size_t __bkt_count) const= [inline]=, = [protected]=, = [noexcept]= Definition at line *1245 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> void std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_copy_code (*_Hash_node_code_cache*< false > &, const *_Hash_node_code_cache*< false > &) const= [inline]=, = [protected]= Definition at line *1256 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> void std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_copy_code (*_Hash_node_code_cache*< true > & __to, const *_Hash_node_code_cache*< true > & __from) const= [inline]=, = [protected]= Definition at line *1265 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> const _Hash & std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_hash () const= [inline]=, = [protected]= Definition at line *1274 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> __hash_code std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_hash_code (const _Key & __k) const= [inline]=, = [protected]= Definition at line *1213 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> template<typename _Kt > __hash_code std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_hash_code_tr (const _Kt & __k) const= [inline]=, = [protected]= Definition at line *1222 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> void std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_store_code (*_Hash_node_code_cache*< false > &, __hash_code) const= [inline]=, = [protected]= Definition at line *1252 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> void std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_store_code (*_Hash_node_code_cache*< true > & __n, __hash_code __c) const= [inline]=, = [protected]= Definition at line *1261 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> void std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::_M_swap (*_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code > & __x)= [inline]=, = [protected]= Definition at line *1270 of file hashtable_policy.h.

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> hasher std::__detail::_Hash_code_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, __cache_hash_code >::hash_function () const= [inline]= Definition at line *1201 of file hashtable_policy.h.

Friends And Related Function Documentation

template<typename _Key , typename _Value , typename _ExtractKey ,

typename _Hash , typename _RangeHash , typename _Unused , bool __cache_hash_code> friend struct _Local_iterator_base*< _Key, _Value, _ExtractKey, _Hash, _RangeHash, _Unused, false >= [friend]= Definition at line *1152 of file hashtable_policy.h.

Author

Generated automatically by Doxygen for libstdc++ from the source code.

Author: dt

Created: 2022-02-20 Sun 19:46