array-hash
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > Class Template Reference

#include <array_map.h>

Public Types

using char_type = typename ht::char_type
 
using mapped_type = T
 
using key_size_type = typename ht::key_size_type
 
using index_size_type = typename ht::index_size_type
 
using size_type = typename ht::size_type
 
using hasher = typename ht::hasher
 
using key_equal = typename ht::key_equal
 
using iterator = typename ht::iterator
 
using const_iterator = typename ht::const_iterator
 

Public Member Functions

 array_map ()
 
 array_map (size_type bucket_count, const Hash &hash=Hash())
 
template<class InputIt , typename std::enable_if< is_iterator< InputIt >::value >::type * = nullptr>
 array_map (InputIt first, InputIt last, size_type bucket_count=ht::DEFAULT_INIT_BUCKET_COUNT, const Hash &hash=Hash())
 
 array_map (std::initializer_list< std::pair< std::basic_string_view< CharT >, T >> init, size_type bucket_count=ht::DEFAULT_INIT_BUCKET_COUNT, const Hash &hash=Hash())
 
array_mapoperator= (std::initializer_list< std::pair< std::basic_string_view< CharT >, T >> ilist)
 
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
 
std::pair< iterator, bool > insert (const std::basic_string_view< CharT > &key, const T &value)
 
std::pair< iterator, bool > insert_ks (const CharT *key, size_type key_size, const T &value)
 
std::pair< iterator, bool > insert (const std::basic_string_view< CharT > &key, T &&value)
 
std::pair< iterator, bool > insert_ks (const CharT *key, size_type key_size, T &&value)
 
template<class InputIt , typename std::enable_if< is_iterator< InputIt >::value >::type * = nullptr>
void insert (InputIt first, InputIt last)
 
void insert (std::initializer_list< std::pair< std::basic_string_view< CharT >, T >> ilist)
 
template<class M >
std::pair< iterator, bool > insert_or_assign (const std::basic_string_view< CharT > &key, M &&obj)
 
template<class M >
std::pair< iterator, bool > insert_or_assign_ks (const CharT *key, size_type key_size, M &&obj)
 
template<class... Args>
std::pair< iterator, bool > emplace (const std::basic_string_view< CharT > &key, Args &&... args)
 
template<class... Args>
std::pair< iterator, bool > emplace_ks (const CharT *key, size_type key_size, Args &&... args)
 
iterator erase (const_iterator pos)
 
iterator erase (const_iterator first, const_iterator last)
 
size_type erase (const std::basic_string_view< CharT > &key)
 
size_type erase_ks (const CharT *key, size_type key_size)
 
size_type erase (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash)
 
size_type erase_ks (const CharT *key, size_type key_size, std::size_t precalculated_hash)
 
void swap (array_map &other)
 
T & at (const std::basic_string_view< CharT > &key)
 
const T & at (const std::basic_string_view< CharT > &key) const
 
T & at_ks (const CharT *key, size_type key_size)
 
const T & at_ks (const CharT *key, size_type key_size) const
 
T & at (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash)
 
const T & at (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash) const
 
T & at_ks (const CharT *key, size_type key_size, std::size_t precalculated_hash)
 
const T & at_ks (const CharT *key, size_type key_size, std::size_t precalculated_hash) const
 
T & operator[] (const std::basic_string_view< CharT > &key)
 
size_type count (const std::basic_string_view< CharT > &key) const
 
size_type count_ks (const CharT *key, size_type key_size) const
 
size_type count (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash) const
 
size_type count_ks (const CharT *key, size_type key_size, std::size_t precalculated_hash) const
 
iterator find (const std::basic_string_view< CharT > &key)
 
const_iterator find (const std::basic_string_view< CharT > &key) const
 
iterator find_ks (const CharT *key, size_type key_size)
 
const_iterator find_ks (const CharT *key, size_type key_size) const
 
iterator find (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash)
 
const_iterator find (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash) const
 
iterator find_ks (const CharT *key, size_type key_size, std::size_t precalculated_hash)
 
const_iterator find_ks (const CharT *key, size_type key_size, std::size_t precalculated_hash) const
 
std::pair< iterator, iteratorequal_range (const std::basic_string_view< CharT > &key)
 
std::pair< const_iterator, const_iteratorequal_range (const std::basic_string_view< CharT > &key) const
 
std::pair< iterator, iteratorequal_range_ks (const CharT *key, size_type key_size)
 
std::pair< const_iterator, const_iteratorequal_range_ks (const CharT *key, size_type key_size) const
 
std::pair< iterator, iteratorequal_range (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash)
 
std::pair< const_iterator, const_iteratorequal_range (const std::basic_string_view< CharT > &key, std::size_t precalculated_hash) const
 
std::pair< iterator, iteratorequal_range_ks (const CharT *key, size_type key_size, std::size_t precalculated_hash)
 
std::pair< const_iterator, const_iteratorequal_range_ks (const CharT *key, size_type key_size, std::size_t precalculated_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
 

Static Public Member Functions

template<class Deserializer >
static array_map deserialize (Deserializer &deserializer, bool hash_compatible=false)
 

Static Public Attributes

static const size_type MAX_KEY_SIZE = ht::MAX_KEY_SIZE
 

Friends

bool operator== (const array_map &lhs, const array_map &rhs)
 
bool operator!= (const array_map &lhs, const array_map &rhs)
 
void swap (array_map &lhs, array_map &rhs)
 

Detailed Description

template<class CharT, class T, class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
class tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >

Implementation of a cache-conscious string hash map.

The map stores the strings as const CharT*. If StoreNullTerminator is true, the strings are stored with the a null-terminator (the key() method of the iterators will return a pointer to this null-terminated string). Otherwise the null character is not stored (which allow an economy of 1 byte per string).

The value T must be either nothrow move-constructible, copy-constuctible or both.

The size of a key string is limited to std::numeric_limits<KeySizeT>::max() - 1. That is 65 535 characters by default, but can be raised with the KeySizeT template parameter. See max_key_size() for an easy access to this limit.

The number of elements in the map is limited to std::numeric_limits<IndexSizeT>::max(). That is 4 294 967 296 elements, but can be raised with the IndexSizeT template parameter. See max_size() for an easy access to this limit.

Iterators invalidation:

Member Typedef Documentation

◆ char_type

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::char_type = typename ht::char_type

◆ const_iterator

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::const_iterator = typename ht::const_iterator

◆ hasher

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::hasher = typename ht::hasher

◆ index_size_type

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::index_size_type = typename ht::index_size_type

◆ iterator

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::iterator = typename ht::iterator

◆ key_equal

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::key_equal = typename ht::key_equal

◆ key_size_type

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::key_size_type = typename ht::key_size_type

◆ mapped_type

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::mapped_type = T

◆ size_type

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
using tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::size_type = typename ht::size_type

Constructor & Destructor Documentation

◆ array_map() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::array_map ( )
inline

◆ array_map() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::array_map ( size_type  bucket_count,
const Hash &  hash = Hash() 
)
inlineexplicit

◆ array_map() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class InputIt , typename std::enable_if< is_iterator< InputIt >::value >::type * = nullptr>
tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::array_map ( InputIt  first,
InputIt  last,
size_type  bucket_count = ht::DEFAULT_INIT_BUCKET_COUNT,
const Hash &  hash = Hash() 
)
inline

◆ array_map() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::array_map ( std::initializer_list< std::pair< std::basic_string_view< CharT >, T >>  init,
size_type  bucket_count = ht::DEFAULT_INIT_BUCKET_COUNT,
const Hash &  hash = Hash() 
)
inline

Member Function Documentation

◆ at() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at ( const std::basic_string_view< CharT > &  key)
inline

◆ at() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at ( const std::basic_string_view< CharT > &  key) const
inline

◆ at() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
)
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ at() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ at_ks() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at_ks ( const CharT *  key,
size_type  key_size 
)
inline

◆ at_ks() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at_ks ( const CharT *  key,
size_type  key_size 
) const
inline

◆ at_ks() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
)
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ at_ks() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::at_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ begin() [1/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::begin ( )
inlinenoexcept

◆ begin() [2/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::begin ( ) const
inlinenoexcept

◆ bucket_count()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::bucket_count ( ) const
inline

◆ cbegin()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::cbegin ( ) const
inlinenoexcept

◆ cend()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::cend ( ) const
inlinenoexcept

◆ clear()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::clear ( )
inlinenoexcept

◆ count() [1/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::count ( const std::basic_string_view< CharT > &  key) const
inline

◆ count() [2/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::count ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ count_ks() [1/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::count_ks ( const CharT *  key,
size_type  key_size 
) const
inline

◆ count_ks() [2/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::count_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ deserialize()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class Deserializer >
static array_map tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::deserialize ( Deserializer &  deserializer,
bool  hash_compatible = false 
)
inlinestatic

Deserialize a previouly serialized map through the deserializer parameter.

The deserializer parameter must be a function object that supports the following calls:

  • template<typename U> U operator()(); where the types std::uint64_t, float and T must be supported for U.
  • void operator()(CharT* value_out, std::size_t value_size);

If the deserialized hash map type is hash compatible with the serialized map, the deserialization process can be sped up by setting hash_compatible to true. To be hash compatible, the Hash (take care of the 32-bits vs 64 bits), KeyEqual, GrowthPolicy, StoreNullTerminator, KeySizeT and IndexSizeT must behave the same than the one used on the serialazed map. Otherwise the behaviour is undefined with hash_compatible sets to true, .

The behaviour is undefined if the type CharT and T of the array_map are not the same as the types used during serialization.

The implementation leaves binary compatibilty (endianness, IEEE 754 for floats, ...) of the types it deserializes in the hands of the Deserializer function object if compatibilty is required.

◆ emplace()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class... Args>
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::emplace ( const std::basic_string_view< CharT > &  key,
Args &&...  args 
)
inline

◆ emplace_ks()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class... Args>
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::emplace_ks ( const CharT *  key,
size_type  key_size,
Args &&...  args 
)
inline

◆ empty()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
bool tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::empty ( ) const
inlinenoexcept

◆ end() [1/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::end ( )
inlinenoexcept

◆ end() [2/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::end ( ) const
inlinenoexcept

◆ equal_range() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range ( const std::basic_string_view< CharT > &  key)
inline

◆ equal_range() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<const_iterator, const_iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range ( const std::basic_string_view< CharT > &  key) const
inline

◆ equal_range() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
)
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ equal_range() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<const_iterator, const_iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ equal_range_ks() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range_ks ( const CharT *  key,
size_type  key_size 
)
inline

◆ equal_range_ks() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<const_iterator, const_iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range_ks ( const CharT *  key,
size_type  key_size 
) const
inline

◆ equal_range_ks() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
)
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ equal_range_ks() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<const_iterator, const_iterator> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::equal_range_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ erase() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::erase ( const_iterator  pos)
inline

Erase has an amortized O(1) runtime complexity, but even if it removes the key immediatly, it doesn't do the same for the associated value T.

T will only be removed when the ratio between the size of the map and the size of the map + the number of deleted values still stored is low enough.

To force the deletion you can call shrink_to_fit.

◆ erase() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Erase has an amortized O(1) runtime complexity, but even if it removes the key immediatly, it doesn't do the same for the associated value T.

T will only be removed when the ratio between the size of the map and the size of the map + the number of deleted values still stored is low enough.

To force the deletion you can call shrink_to_fit.

◆ erase() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::erase ( const std::basic_string_view< CharT > &  key)
inline

Erase has an amortized O(1) runtime complexity, but even if it removes the key immediatly, it doesn't do the same for the associated value T.

T will only be removed when the ratio between the size of the map and the size of the map + the number of deleted values still stored is low enough.

To force the deletion you can call shrink_to_fit.

◆ erase() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::erase ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
)
inline

Erase has an amortized O(1) runtime complexity, but even if it removes the key immediatly, it doesn't do the same for the associated value T.

T will only be removed when the ratio between the size of the map and the size of the map + the number of deleted values still stored is low enough.

To force the deletion you can call shrink_to_fit.

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ erase_ks() [1/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::erase_ks ( const CharT *  key,
size_type  key_size 
)
inline

Erase has an amortized O(1) runtime complexity, but even if it removes the key immediatly, it doesn't do the same for the associated value T.

T will only be removed when the ratio between the size of the map and the size of the map + the number of deleted values still stored is low enough.

To force the deletion you can call shrink_to_fit.

◆ erase_ks() [2/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::erase_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
)
inline

Erase has an amortized O(1) runtime complexity, but even if it removes the key immediatly, it doesn't do the same for the associated value T.

T will only be removed when the ratio between the size of the map and the size of the map + the number of deleted values still stored is low enough.

To force the deletion you can call shrink_to_fit.

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ find() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find ( const std::basic_string_view< CharT > &  key)
inline

◆ find() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find ( const std::basic_string_view< CharT > &  key) const
inline

◆ find() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
)
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ find() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find ( const std::basic_string_view< CharT > &  key,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ find_ks() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find_ks ( const CharT *  key,
size_type  key_size 
)
inline

◆ find_ks() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find_ks ( const CharT *  key,
size_type  key_size 
) const
inline

◆ find_ks() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
)
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ find_ks() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const_iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::find_ks ( const CharT *  key,
size_type  key_size,
std::size_t  precalculated_hash 
) const
inline

Use the hash value 'precalculated_hash' instead of hashing the key. The hash value should be the same as hash_function()(key). Usefull to speed-up the lookup to the value if you already have the hash.

◆ hash_function()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
hasher tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::hash_function ( ) const
inline

◆ insert() [1/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert ( const std::basic_string_view< CharT > &  key,
const T &  value 
)
inline

◆ insert() [2/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert ( const std::basic_string_view< CharT > &  key,
T &&  value 
)
inline

◆ insert() [3/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class InputIt , typename std::enable_if< is_iterator< InputIt >::value >::type * = nullptr>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert ( InputIt  first,
InputIt  last 
)
inline

◆ insert() [4/4]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert ( std::initializer_list< std::pair< std::basic_string_view< CharT >, T >>  ilist)
inline

◆ insert_ks() [1/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert_ks ( const CharT *  key,
size_type  key_size,
const T &  value 
)
inline

◆ insert_ks() [2/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert_ks ( const CharT *  key,
size_type  key_size,
T &&  value 
)
inline

◆ insert_or_assign()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class M >
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert_or_assign ( const std::basic_string_view< CharT > &  key,
M &&  obj 
)
inline

◆ insert_or_assign_ks()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class M >
std::pair<iterator, bool> tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::insert_or_assign_ks ( const CharT *  key,
size_type  key_size,
M &&  obj 
)
inline

◆ key_eq()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
key_equal tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::key_eq ( ) const
inline

◆ load_factor()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
float tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::load_factor ( ) const
inline

◆ max_bucket_count()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::max_bucket_count ( ) const
inline

◆ max_key_size()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::max_key_size ( ) const
inlinenoexcept

◆ max_load_factor() [1/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
float tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::max_load_factor ( ) const
inline

◆ max_load_factor() [2/2]

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::max_load_factor ( float  ml)
inline

◆ max_size()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::max_size ( ) const
inlinenoexcept

◆ mutable_iterator()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
iterator tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::mutable_iterator ( const_iterator  it)
inlinenoexcept

Return the const_iterator it as an iterator.

◆ operator=()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
array_map& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::operator= ( std::initializer_list< std::pair< std::basic_string_view< CharT >, T >>  ilist)
inline

◆ operator[]()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
T& tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::operator[] ( const std::basic_string_view< CharT > &  key)
inline

◆ rehash()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::rehash ( size_type  count)
inline

◆ reserve()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::reserve ( size_type  count)
inline

◆ serialize()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
template<class Serializer >
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::serialize ( Serializer &  serializer) const
inline

Serialize the map through the serializer parameter.

The serializer parameter must be a function object that supports the following calls:

  • void operator()(const U& value); where the types std::uint64_t, float and T must be supported for U.
  • void operator()(const CharT* value, std::size_t value_size);

The implementation leaves binary compatibilty (endianness, IEEE 754 for floats, ...) of the types it serializes in the hands of the Serializer function object if compatibilty is required.

◆ shrink_to_fit()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::shrink_to_fit ( )
inline

◆ size()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::size ( ) const
inlinenoexcept

◆ swap()

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::swap ( array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > &  other)
inline

Friends And Related Function Documentation

◆ operator!=

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
bool operator!= ( const array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > &  lhs,
const array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > &  rhs 
)
friend

◆ operator==

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
bool operator== ( const array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > &  lhs,
const array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > &  rhs 
)
friend

◆ swap

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
void swap ( array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > &  lhs,
array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy > &  rhs 
)
friend

Member Data Documentation

◆ MAX_KEY_SIZE

template<class CharT , class T , class Hash = tsl::ah::str_hash<CharT>, class KeyEqual = tsl::ah::str_equal<CharT>, bool StoreNullTerminator = true, class KeySizeT = std::uint16_t, class IndexSizeT = std::uint32_t, class GrowthPolicy = tsl::ah::power_of_two_growth_policy<2>>
const size_type tsl::array_map< CharT, T, Hash, KeyEqual, StoreNullTerminator, KeySizeT, IndexSizeT, GrowthPolicy >::MAX_KEY_SIZE = ht::MAX_KEY_SIZE
static

The documentation for this class was generated from the following file: