|
| unordered_multimap () |
|
| unordered_multimap (const allocator_type &alloc) |
|
| unordered_multimap (size_type bucketCount, const allocator_type &alloc=allocator_type()) |
|
| unordered_multimap (size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type()) |
|
| unordered_multimap (size_type bucketCount, const hasher &hashFunc, const key_equal &equalFunc, const allocator_type &alloc=allocator_type()) |
|
template<typename Iterator > |
| unordered_multimap (Iterator first, Iterator last) |
|
template<typename Iterator > |
| unordered_multimap (Iterator first, Iterator last, size_type bucketCount, const allocator_type &alloc=allocator_type()) |
|
template<typename Iterator > |
| unordered_multimap (Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type()) |
|
template<typename Iterator > |
| unordered_multimap (Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const key_equal &equalFunc, const allocator_type &alloc=allocator_type()) |
|
| unordered_multimap (std::initializer_list< value_type > values) |
|
| unordered_multimap (std::initializer_list< value_type > values, size_type bucketCount, const allocator_type &alloc=allocator_type()) |
|
| unordered_multimap (std::initializer_list< value_type > values, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type()) |
|
| unordered_multimap (std::initializer_list< value_type > values, size_type bucketCount, const hasher &hashFunc, const key_equal &equalFunc, const allocator_type &alloc=allocator_type()) |
|
| unordered_multimap (unordered_multimap &&right) noexcept |
|
| unordered_multimap (unordered_multimap &&right, const momo::internal::Identity< allocator_type > &alloc) noexcept(std::is_empty< allocator_type >::value) |
|
| unordered_multimap (const unordered_multimap &right) |
|
| unordered_multimap (const unordered_multimap &right, const momo::internal::Identity< allocator_type > &alloc) |
|
| ~unordered_multimap ()=default |
|
unordered_multimap & | operator= (unordered_multimap &&right) noexcept(std::is_empty< allocator_type >::value||std::allocator_traits< allocator_type >::propagate_on_container_move_assignment::value) |
|
unordered_multimap & | operator= (const unordered_multimap &right) |
|
unordered_multimap & | operator= (std::initializer_list< value_type > values) |
|
void | swap (unordered_multimap &right) noexcept |
|
const nested_container_type & | get_nested_container () const noexcept |
|
nested_container_type & | get_nested_container () noexcept |
|
const_iterator | begin () const noexcept |
|
iterator | begin () noexcept |
|
const_iterator | end () const noexcept |
|
iterator | end () noexcept |
|
const_iterator | cbegin () const noexcept |
|
const_iterator | cend () const noexcept |
|
hasher | hash_function () const |
|
key_equal | key_eq () const |
|
allocator_type | get_allocator () const noexcept |
|
size_type | max_size () const noexcept |
|
size_type | size () const noexcept |
|
MOMO_NODISCARD bool | empty () const noexcept |
|
void | clear () noexcept |
|
MOMO_FORCEINLINE const_iterator | find (const key_type &key) const |
|
MOMO_FORCEINLINE iterator | find (const key_type &key) |
|
template<typename KeyArg > |
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > | find (const KeyArg &key) const |
|
template<typename KeyArg > |
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, iterator > | find (const KeyArg &key) |
|
MOMO_FORCEINLINE size_type | count (const key_type &key) const |
|
template<typename KeyArg > |
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, size_type > | count (const KeyArg &key) const |
|
MOMO_FORCEINLINE bool | contains (const key_type &key) const |
|
template<typename KeyArg > |
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, bool > | contains (const KeyArg &key) const |
|
MOMO_FORCEINLINE std::pair< const_iterator, const_iterator > | equal_range (const key_type &key) const |
|
MOMO_FORCEINLINE std::pair< iterator, iterator > | equal_range (const key_type &key) |
|
template<typename KeyArg > |
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< const_iterator, const_iterator > > | equal_range (const KeyArg &key) const |
|
template<typename KeyArg > |
MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< iterator, iterator > > | equal_range (const KeyArg &key) |
|
iterator | insert (std::pair< key_type, mapped_type > &&value) |
|
iterator | insert (const_iterator, std::pair< key_type, mapped_type > &&value) |
|
template<typename First , typename Second > |
momo::internal::EnableIf< std::is_constructible< key_type, const First & >::value &&std::is_constructible< mapped_type, const Second & >::value, iterator > | insert (const std::pair< First, Second > &value) |
|
template<typename First , typename Second > |
momo::internal::EnableIf< std::is_constructible< key_type, const First & >::value &&std::is_constructible< mapped_type, const Second & >::value, iterator > | insert (const_iterator, const std::pair< First, Second > &value) |
|
template<typename First , typename Second > |
momo::internal::EnableIf< std::is_constructible< key_type, First && >::value &&std::is_constructible< mapped_type, Second && >::value, iterator > | insert (std::pair< First, Second > &&value) |
|
template<typename First , typename Second > |
momo::internal::EnableIf< std::is_constructible< key_type, First && >::value &&std::is_constructible< mapped_type, Second && >::value, iterator > | insert (const_iterator, std::pair< First, Second > &&value) |
|
template<typename Iterator > |
void | insert (Iterator first, Iterator last) |
|
void | insert (std::initializer_list< value_type > values) |
|
iterator | emplace () |
|
iterator | emplace_hint (const_iterator) |
|
template<typename ValueArg > |
iterator | emplace (ValueArg &&valueArg) |
|
template<typename ValueArg > |
iterator | emplace_hint (const_iterator, ValueArg &&valueArg) |
|
template<typename KeyArg , typename MappedArg > |
iterator | emplace (KeyArg &&keyArg, MappedArg &&mappedArg) |
|
template<typename KeyArg , typename MappedArg > |
iterator | emplace_hint (const_iterator, KeyArg &&keyArg, MappedArg &&mappedArg) |
|
template<typename... KeyArgs, typename... MappedArgs> |
iterator | emplace (std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs) |
|
template<typename... KeyArgs, typename... MappedArgs> |
iterator | emplace_hint (const_iterator, std::piecewise_construct_t, std::tuple< KeyArgs... > keyArgs, std::tuple< MappedArgs... > mappedArgs) |
|
iterator | erase (const_iterator where) |
|
iterator | erase (iterator where) |
|
iterator | erase (const_iterator first, const_iterator last) |
|
size_type | erase (const key_type &key) |
|
bool | operator== (const unordered_multimap &right) const |
|
bool | operator!= (const unordered_multimap &right) const |
|
template<typename TKey, typename TMapped, typename THashFunc = HashCoder<TKey>, typename TEqualFunc = std::equal_to<TKey>, typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>, typename THashMultiMap = HashMultiMap<TKey, TMapped, HashTraitsStd<TKey, THashFunc, TEqualFunc>, MemManagerStd<TAllocator>>>
class momo::stdish::unordered_multimap< TKey, TMapped, THashFunc, TEqualFunc, TAllocator, THashMultiMap >
momo::stdish::unordered_multimap
is similar to std::unordered_multimap
, but much more efficient in memory usage. The implementation is based on hash table with buckets in the form of small arrays.
Deviations from the std::unordered_multimap
:
- Each of duplicate keys stored only once.
max_load_factor
, rehash
, reserve
, load_factor
and all the functions, associated with buckets or nodes, are not implemented.
- Container items must be movable (preferably without exceptions) or copyable, similar to items of
std::vector
.
- After each addition or removal of the item all iterators and references to items become invalid and should not be used.
- Type
reference
is not the same as value_type&
, so for (auto& p : map)
is illegal, but for (auto p : map)
or for (const auto& p : map)
or for (auto&& p : map)
is allowed.
- Functions
clear
, begin
, cbegin
and iterator increment take O(bucket_count) time in worst case.
- Functions
erase
can throw exceptions thrown by key_type
and mapped_type
move assignment operators.
It is allowed to pass to functions insert
and emplace
references to items within the container. But in case of the function insert
, receiving pair of iterators, it's not allowed to pass iterators pointing to the items within the container.