Inherits tsl::detail_array_hash::value_container< T >, Hash, and GrowthPolicy.
|
| | array_hash (size_type bucket_count, const Hash &hash, float max_load_factor) |
| |
| | array_hash (const array_hash &other) |
| |
| | array_hash (array_hash &&other) noexcept(std::is_nothrow_move_constructible< value_container< T >>::value &&std::is_nothrow_move_constructible< Hash >::value &&std::is_nothrow_move_constructible< GrowthPolicy >::value &&std::is_nothrow_move_constructible< std::vector< array_bucket >>::value) |
| |
| array_hash & | operator= (const array_hash &other) |
| |
| array_hash & | operator= (array_hash &&other) |
| |
| iterator | begin () noexcept |
| |
| const_iterator | begin () const noexcept |
| |
| const_iterator | cbegin () const noexcept |
| |
| iterator | end () noexcept |
| |
| const_iterator | end () const noexcept |
| |
| const_iterator | cend () const noexcept |
| |
| bool | empty () const noexcept |
| |
| size_type | size () const noexcept |
| |
| size_type | max_size () const noexcept |
| |
| size_type | max_key_size () const noexcept |
| |
| void | shrink_to_fit () |
| |
| void | clear () noexcept |
| |
| template<class... ValueArgs> |
| std::pair< iterator, bool > | emplace (const CharT *key, size_type key_size, ValueArgs &&... value_args) |
| |
| template<class M > |
| std::pair< iterator, bool > | insert_or_assign (const CharT *key, size_type key_size, M &&obj) |
| |
| iterator | erase (const_iterator pos) |
| |
| iterator | erase (const_iterator first, const_iterator last) |
| |
| size_type | erase (const CharT *key, size_type key_size) |
| |
| size_type | erase (const CharT *key, size_type key_size, std::size_t hash) |
| |
| void | swap (array_hash &other) |
| |
| template<class U = T, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr> |
| U & | at (const CharT *key, size_type key_size) |
| |
| template<class U = T, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr> |
| const U & | at (const CharT *key, size_type key_size) const |
| |
| template<class U = T, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr> |
| U & | at (const CharT *key, size_type key_size, std::size_t hash) |
| |
| template<class U = T, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr> |
| const U & | at (const CharT *key, size_type key_size, std::size_t hash) const |
| |
| template<class U = T, typename std::enable_if< has_mapped_type< U >::value >::type * = nullptr> |
| U & | access_operator (const CharT *key, size_type key_size) |
| |
| size_type | count (const CharT *key, size_type key_size) const |
| |
| size_type | count (const CharT *key, size_type key_size, std::size_t hash) const |
| |
| iterator | find (const CharT *key, size_type key_size) |
| |
| const_iterator | find (const CharT *key, size_type key_size) const |
| |
| iterator | find (const CharT *key, size_type key_size, std::size_t hash) |
| |
| const_iterator | find (const CharT *key, size_type key_size, std::size_t hash) const |
| |
| std::pair< iterator, iterator > | equal_range (const CharT *key, size_type key_size) |
| |
| std::pair< const_iterator, const_iterator > | equal_range (const CharT *key, size_type key_size) const |
| |
| std::pair< iterator, iterator > | equal_range (const CharT *key, size_type key_size, std::size_t hash) |
| |
| std::pair< const_iterator, const_iterator > | equal_range (const CharT *key, size_type key_size, std::size_t hash) const |
| |
| size_type | bucket_count () const |
| |
| size_type | max_bucket_count () const |
| |
| float | load_factor () const |
| |
| float | max_load_factor () const |
| |
| void | max_load_factor (float ml) |
| |
| void | rehash (size_type count) |
| |
| void | reserve (size_type count) |
| |
| hasher | hash_function () const |
| |
| key_equal | key_eq () const |
| |
| iterator | mutable_iterator (const_iterator it) noexcept |
| |
| template<class Serializer > |
| void | serialize (Serializer &serializer) const |
| |
| template<class Deserializer > |
| void | deserialize (Deserializer &deserializer, bool hash_compatible) |
| |
template<class CharT, class T, class Hash, class KeyEqual, bool StoreNullTerminator, class KeySizeT, class IndexSizeT, class GrowthPolicy>
class tsl::detail_array_hash::array_hash< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >
If there is no value in the array_hash (in the case of a set for example), T should be void.
The size of a key string is limited to std::numeric_limits<KeySizeT>::max() - 1.
The number of elements in the map is limited to std::numeric_limits<IndexSizeT>::max().
template<class CharT, class T, class Hash, class KeyEqual, bool StoreNullTerminator, class KeySizeT, class IndexSizeT, class GrowthPolicy>
When erasing an element from a bucket with erase_from_bucket, it invalidates all the iterators in the array bucket of the element (m_array_bucket_iterator) but not the iterators of the buckets itself (m_buckets_iterator).
So first erase all the values between first and last which are not part of the bucket of last, and then erase carefully the values in last's bucket.