Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > Class Template Reference

#include <linked_hash_map.h>

Public Types

using key_type = Key
 
using mapped_type = Value
 
using hasher = KeyHash
 
using key_equal = KeyEq
 
using value_type = std::pair<const key_type, mapped_type>
 
using allocator_type = Alloc
 
using difference_type = ptrdiff_t
 
using iterator = typename ListType::iterator
 
using const_iterator = typename ListType::const_iterator
 
using reverse_iterator = typename ListType::reverse_iterator
 
using const_reverse_iterator = typename ListType::const_reverse_iterator
 
using reference = typename ListType::reference
 
using const_reference = typename ListType::const_reference
 
using size_type = typename ListType::size_type
 
using pointer = typename std::allocator_traits<allocator_type>::pointer
 
using const_pointer
 
using node_type = NodeHandle
 
using insert_return_type = InsertReturnType<iterator, node_type>
 

Public Member Functions

 linked_hash_map ()=default
 
 linked_hash_map (size_t bucket_count, const hasher &hash=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type())
 
 linked_hash_map (size_t bucket_count, const hasher &hash, const allocator_type &alloc)
 
 linked_hash_map (size_t bucket_count, const allocator_type &alloc)
 
 linked_hash_map (const allocator_type &alloc)
 
template<class InputIt >
 linked_hash_map (InputIt first, InputIt last, size_t bucket_count=0, const hasher &hash=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type())
 
template<class InputIt >
 linked_hash_map (InputIt first, InputIt last, size_t bucket_count, const hasher &hash, const allocator_type &alloc)
 
template<class InputIt >
 linked_hash_map (InputIt first, InputIt last, size_t bucket_count, const allocator_type &alloc)
 
template<class InputIt >
 linked_hash_map (InputIt first, InputIt last, const allocator_type &alloc)
 
 linked_hash_map (std::initializer_list< value_type > init, size_t bucket_count=0, const hasher &hash=hasher(), const key_equal &eq=key_equal(), const allocator_type &alloc=allocator_type())
 
 linked_hash_map (std::initializer_list< value_type > init, size_t bucket_count, const hasher &hash, const allocator_type &alloc)
 
 linked_hash_map (std::initializer_list< value_type > init, size_t bucket_count, const allocator_type &alloc)
 
 linked_hash_map (std::initializer_list< value_type > init, const allocator_type &alloc)
 
 linked_hash_map (const linked_hash_map &other)
 
 linked_hash_map (const linked_hash_map &other, const allocator_type &alloc)
 
 linked_hash_map (linked_hash_map &&other) noexcept
 
 linked_hash_map (linked_hash_map &&other, const allocator_type &alloc)
 
linked_hash_mapoperator= (const linked_hash_map &other)
 
linked_hash_mapoperator= (linked_hash_map &&other) noexcept
 
linked_hash_mapoperator= (std::initializer_list< value_type > values)
 
size_type size () const
 Derive size_ from set_, as list::size might be O(N).
 
size_type max_size () const noexcept
 
bool empty () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
reference front ()
 
reference back ()
 
const_reference front () const
 
const_reference back () const
 
void pop_front ()
 
void pop_back ()
 
ABSL_ATTRIBUTE_REINITIALIZES void clear ()
 
void reserve (size_t n)
 
size_t capacity () const
 
size_t bucket_count () const
 
float load_factor () const
 
hasher hash_function () const
 
key_equal key_eq () const
 
allocator_type get_allocator () const
 
template<class K = key_type>
size_type erase (const key_arg< K > &key)
 
iterator erase (const_iterator position)
 
iterator erase (iterator position)
 
iterator erase (iterator first, iterator last)
 
iterator erase (const_iterator first, const_iterator last)
 
template<class K = key_type>
iterator find (const key_arg< K > &key)
 
template<class K = key_type>
const_iterator find (const key_arg< K > &key) const
 
template<class K = key_type>
size_type count (const key_arg< K > &key) const
 
template<class K = key_type>
bool contains (const key_arg< K > &key) const
 
template<class K = key_type>
mapped_typeat (const key_arg< K > &key)
 
template<class K = key_type>
const mapped_typeat (const key_arg< K > &key) const
 
template<class K = key_type>
std::pair< iterator, iteratorequal_range (const key_arg< K > &key)
 
template<class K = key_type>
std::pair< const_iterator, const_iteratorequal_range (const key_arg< K > &key) const
 
template<class K = key_type>
mapped_typeoperator[] (const key_arg< K > &key)
 
template<class K = key_type, K * = nullptr>
mapped_typeoperator[] (key_arg< K > &&key)
 
std::pair< iterator, bool > insert (const value_type &v)
 
std::pair< iterator, bool > insert (value_type &&v)
 
iterator insert (const_iterator, const value_type &v)
 
iterator insert (const_iterator, value_type &&v)
 
void insert (std::initializer_list< value_type > ilist)
 
template<class InputIt >
void insert (InputIt first, InputIt last)
 
insert_return_type insert (node_type &&node)
 
iterator insert (const_iterator, node_type &&node)
 
template<class K = key_type, class V = mapped_type, K * = nullptr, V * = nullptr>
std::pair< iterator, bool > insert_or_assign (key_arg< K > &&k, V &&v)
 
template<class K = key_type, class V = mapped_type, K * = nullptr>
std::pair< iterator, bool > insert_or_assign (key_arg< K > &&k, const V &v)
 
template<class K = key_type, class V = mapped_type, V * = nullptr>
std::pair< iterator, bool > insert_or_assign (const key_arg< K > &k, V &&v)
 
template<class K = key_type, class V = mapped_type>
std::pair< iterator, bool > insert_or_assign (const key_arg< K > &k, const V &v)
 
template<class K = key_type, class V = mapped_type, K * = nullptr, V * = nullptr>
iterator insert_or_assign (const_iterator, key_arg< K > &&k, V &&v)
 
template<class K = key_type, class V = mapped_type, K * = nullptr>
iterator insert_or_assign (const_iterator, key_arg< K > &&k, const V &v)
 
template<class K = key_type, class V = mapped_type, V * = nullptr>
iterator insert_or_assign (const_iterator, const key_arg< K > &k, V &&v)
 
template<class K = key_type, class V = mapped_type>
iterator insert_or_assign (const_iterator, const key_arg< K > &k, const V &v)
 
template<typename... Args>
std::pair< iterator, bool > emplace (Args &&... args)
 
template<class K = key_type, class... Args, K * = nullptr>
iterator try_emplace (const_iterator, key_arg< K > &&k, Args &&... args)
 
template<typename... Args>
iterator emplace_hint (const_iterator, Args &&... args)
 
template<class K = key_type, typename... Args, K * = nullptr>
std::pair< iterator, bool > try_emplace (key_arg< K > &&key, Args &&... args)
 
template<typename H , typename E >
void merge (linked_hash_map< Key, Value, H, E, Alloc > &src)
 
template<typename H , typename E >
void merge (linked_hash_map< Key, Value, H, E, Alloc > &&src)
 
node_type extract (const_iterator position)
 
template<class K = key_type, std::enable_if_t<!std::is_same_v< K, iterator >, int > = 0>
node_type extract (const key_arg< K > &key)
 
template<class K = key_type, typename... Args>
std::pair< iterator, bool > try_emplace (const key_arg< K > &key, Args &&... args)
 
void swap (linked_hash_map &other)
 
void rehash (size_t n)
 

Friends

bool operator== (const linked_hash_map &a, const linked_hash_map &b)
 
bool operator!= (const linked_hash_map &a, const linked_hash_map &b)
 

Detailed Description

template<typename Key, typename Value, typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
class gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >

This holds a list of pair<Key, Value> items. This list is what gets traversed, and it's iterators from this list that we return from begin/end/find.

We also keep a set<list::iterator> for find. Since std::list is a doubly-linked list, the iterators should remain stable.

Definition at line 52 of file linked_hash_map.h.

Member Typedef Documentation

◆ allocator_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::allocator_type = Alloc

Definition at line 69 of file linked_hash_map.h.

◆ const_iterator

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::const_iterator = typename ListType::const_iterator

Definition at line 141 of file linked_hash_map.h.

◆ const_pointer

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::const_pointer
Initial value:
typename std::allocator_traits<allocator_type>::const_pointer

Definition at line 148 of file linked_hash_map.h.

◆ const_reference

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::const_reference = typename ListType::const_reference

Definition at line 145 of file linked_hash_map.h.

◆ const_reverse_iterator

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::const_reverse_iterator = typename ListType::const_reverse_iterator

Definition at line 143 of file linked_hash_map.h.

◆ difference_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::difference_type = ptrdiff_t

Definition at line 70 of file linked_hash_map.h.

◆ hasher

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::hasher = KeyHash

Definition at line 66 of file linked_hash_map.h.

◆ insert_return_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_return_type = InsertReturnType<iterator, node_type>

Definition at line 151 of file linked_hash_map.h.

◆ iterator

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::iterator = typename ListType::iterator

Definition at line 140 of file linked_hash_map.h.

◆ key_equal

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::key_equal = KeyEq

Definition at line 67 of file linked_hash_map.h.

◆ key_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::key_type = Key

Definition at line 64 of file linked_hash_map.h.

◆ mapped_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::mapped_type = Value

Definition at line 65 of file linked_hash_map.h.

◆ node_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::node_type = NodeHandle

Definition at line 150 of file linked_hash_map.h.

◆ pointer

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::pointer = typename std::allocator_traits<allocator_type>::pointer

Definition at line 147 of file linked_hash_map.h.

◆ reference

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::reference = typename ListType::reference

Definition at line 144 of file linked_hash_map.h.

◆ reverse_iterator

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::reverse_iterator = typename ListType::reverse_iterator

Definition at line 142 of file linked_hash_map.h.

◆ size_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::size_type = typename ListType::size_type

Definition at line 146 of file linked_hash_map.h.

◆ value_type

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
using gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::value_type = std::pair<const key_type, mapped_type>

Definition at line 68 of file linked_hash_map.h.

Constructor & Destructor Documentation

◆ linked_hash_map() [1/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( )
default

◆ linked_hash_map() [2/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( size_t bucket_count,
const hasher & hash = hasher(),
const key_equal & eq = key_equal(),
const allocator_type & alloc = allocator_type() )
inlineexplicit

Definition at line 155 of file linked_hash_map.h.

◆ linked_hash_map() [3/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( size_t bucket_count,
const hasher & hash,
const allocator_type & alloc )
inline

Definition at line 162 of file linked_hash_map.h.

◆ linked_hash_map() [4/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( size_t bucket_count,
const allocator_type & alloc )
inline

Definition at line 166 of file linked_hash_map.h.

◆ linked_hash_map() [5/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( const allocator_type & alloc)
inlineexplicit

Definition at line 169 of file linked_hash_map.h.

◆ linked_hash_map() [6/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class InputIt >
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( InputIt first,
InputIt last,
size_t bucket_count = 0,
const hasher & hash = hasher(),
const key_equal & eq = key_equal(),
const allocator_type & alloc = allocator_type() )
inline

Definition at line 173 of file linked_hash_map.h.

◆ linked_hash_map() [7/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class InputIt >
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( InputIt first,
InputIt last,
size_t bucket_count,
const hasher & hash,
const allocator_type & alloc )
inline

Definition at line 182 of file linked_hash_map.h.

◆ linked_hash_map() [8/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class InputIt >
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( InputIt first,
InputIt last,
size_t bucket_count,
const allocator_type & alloc )
inline

Definition at line 187 of file linked_hash_map.h.

◆ linked_hash_map() [9/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class InputIt >
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( InputIt first,
InputIt last,
const allocator_type & alloc )
inline

Definition at line 193 of file linked_hash_map.h.

◆ linked_hash_map() [10/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( std::initializer_list< value_type > init,
size_t bucket_count = 0,
const hasher & hash = hasher(),
const key_equal & eq = key_equal(),
const allocator_type & alloc = allocator_type() )
inline

Definition at line 197 of file linked_hash_map.h.

◆ linked_hash_map() [11/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( std::initializer_list< value_type > init,
size_t bucket_count,
const hasher & hash,
const allocator_type & alloc )
inline

Definition at line 204 of file linked_hash_map.h.

◆ linked_hash_map() [12/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( std::initializer_list< value_type > init,
size_t bucket_count,
const allocator_type & alloc )
inline

Definition at line 208 of file linked_hash_map.h.

◆ linked_hash_map() [13/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( std::initializer_list< value_type > init,
const allocator_type & alloc )
inline

Definition at line 212 of file linked_hash_map.h.

◆ linked_hash_map() [14/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( const linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & other)
inline

Definition at line 217 of file linked_hash_map.h.

◆ linked_hash_map() [15/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( const linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & other,
const allocator_type & alloc )
inline

Definition at line 223 of file linked_hash_map.h.

◆ linked_hash_map() [16/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > && other)
inlinenoexcept

Since the list and set must agree for other to end up "valid", explicitly clear them.

Definition at line 229 of file linked_hash_map.h.

◆ linked_hash_map() [17/17]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::linked_hash_map ( linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > && other,
const allocator_type & alloc )
inline

Definition at line 237 of file linked_hash_map.h.

Member Function Documentation

◆ at() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
mapped_type & gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::at ( const key_arg< K > & key)
inline

Definition at line 371 of file linked_hash_map.h.

◆ at() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
const mapped_type & gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::at ( const key_arg< K > & key) const
inline

Definition at line 380 of file linked_hash_map.h.

◆ back() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
reference gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::back ( )
inline

Definition at line 292 of file linked_hash_map.h.

◆ back() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_reference gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::back ( ) const
inline

Definition at line 294 of file linked_hash_map.h.

◆ begin() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::begin ( )
inline

Iteration is list-like, in insertion order. These are all forwarded.

Definition at line 279 of file linked_hash_map.h.

◆ begin() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::begin ( ) const
inline

Definition at line 281 of file linked_hash_map.h.

◆ bucket_count()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
size_t gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::bucket_count ( ) const
inline

Definition at line 306 of file linked_hash_map.h.

◆ capacity()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
size_t gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::capacity ( ) const
inline

Definition at line 305 of file linked_hash_map.h.

◆ cbegin()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::cbegin ( ) const
inline

Definition at line 283 of file linked_hash_map.h.

◆ cend()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::cend ( ) const
inline

Definition at line 284 of file linked_hash_map.h.

◆ clear()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
ABSL_ATTRIBUTE_REINITIALIZES void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::clear ( )
inline

Definition at line 299 of file linked_hash_map.h.

◆ contains()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
bool gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::contains ( const key_arg< K > & key) const
inline

Definition at line 366 of file linked_hash_map.h.

◆ count()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
size_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::count ( const key_arg< K > & key) const
inline

Definition at line 362 of file linked_hash_map.h.

◆ crbegin()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_reverse_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::crbegin ( ) const
inline

Definition at line 289 of file linked_hash_map.h.

◆ crend()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_reverse_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::crend ( ) const
inline

Definition at line 290 of file linked_hash_map.h.

◆ emplace()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<typename... Args>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::emplace ( Args &&... args)
inline

Definition at line 495 of file linked_hash_map.h.

◆ emplace_hint()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<typename... Args>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::emplace_hint ( const_iterator ,
Args &&... args )
inline

Definition at line 511 of file linked_hash_map.h.

◆ empty()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
bool gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::empty ( ) const
inline

Definition at line 275 of file linked_hash_map.h.

◆ end() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::end ( )
inline

Definition at line 280 of file linked_hash_map.h.

◆ end() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::end ( ) const
inline

Definition at line 282 of file linked_hash_map.h.

◆ equal_range() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
std::pair< iterator, iterator > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::equal_range ( const key_arg< K > & key)
inline

Definition at line 385 of file linked_hash_map.h.

◆ equal_range() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
std::pair< const_iterator, const_iterator > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::equal_range ( const key_arg< K > & key) const
inline

Definition at line 392 of file linked_hash_map.h.

◆ erase() [1/5]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
size_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::erase ( const key_arg< K > & key)
inline

Erase set entry first since it refers to the list element.

Definition at line 314 of file linked_hash_map.h.

◆ erase() [2/5]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::erase ( const_iterator first,
const_iterator last )
inline

Definition at line 341 of file linked_hash_map.h.

◆ erase() [3/5]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::erase ( const_iterator position)
inline

Definition at line 324 of file linked_hash_map.h.

◆ erase() [4/5]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::erase ( iterator first,
iterator last )
inline

Definition at line 336 of file linked_hash_map.h.

◆ erase() [5/5]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::erase ( iterator position)
inline

Definition at line 332 of file linked_hash_map.h.

◆ extract() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, std::enable_if_t<!std::is_same_v< K, iterator >, int > = 0>
node_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::extract ( const key_arg< K > & key)
inline

Definition at line 547 of file linked_hash_map.h.

◆ extract() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
node_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::extract ( const_iterator position)
inline

Definition at line 538 of file linked_hash_map.h.

◆ find() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::find ( const key_arg< K > & key)
inline

Definition at line 348 of file linked_hash_map.h.

◆ find() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
const_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::find ( const key_arg< K > & key) const
inline

Definition at line 355 of file linked_hash_map.h.

◆ front() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
reference gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::front ( )
inline

Definition at line 291 of file linked_hash_map.h.

◆ front() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_reference gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::front ( ) const
inline

Definition at line 293 of file linked_hash_map.h.

◆ get_allocator()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
allocator_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::get_allocator ( ) const
inline

Definition at line 311 of file linked_hash_map.h.

◆ hash_function()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
hasher gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::hash_function ( ) const
inline

Definition at line 309 of file linked_hash_map.h.

◆ insert() [1/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( const value_type & v)
inline

Definition at line 409 of file linked_hash_map.h.

◆ insert() [2/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( const_iterator ,
const value_type & v )
inline

Definition at line 416 of file linked_hash_map.h.

◆ insert() [3/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( const_iterator ,
node_type && node )
inline

Definition at line 441 of file linked_hash_map.h.

◆ insert() [4/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( const_iterator ,
value_type && v )
inline

Definition at line 419 of file linked_hash_map.h.

◆ insert() [5/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class InputIt >
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( InputIt first,
InputIt last )
inline

Definition at line 428 of file linked_hash_map.h.

◆ insert() [6/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
insert_return_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( node_type && node)
inline

Definition at line 432 of file linked_hash_map.h.

◆ insert() [7/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( std::initializer_list< value_type > ilist)
inline

Definition at line 423 of file linked_hash_map.h.

◆ insert() [8/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert ( value_type && v)
inline

Definition at line 412 of file linked_hash_map.h.

◆ insert_or_assign() [1/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( const key_arg< K > & k,
const V & v )
inline

Definition at line 469 of file linked_hash_map.h.

◆ insert_or_assign() [2/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type, V * = nullptr>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( const key_arg< K > & k,
V && v )
inline

Definition at line 464 of file linked_hash_map.h.

◆ insert_or_assign() [3/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( const_iterator ,
const key_arg< K > & k,
const V & v )
inline

Definition at line 490 of file linked_hash_map.h.

◆ insert_or_assign() [4/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type, V * = nullptr>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( const_iterator ,
const key_arg< K > & k,
V && v )
inline

Definition at line 485 of file linked_hash_map.h.

◆ insert_or_assign() [5/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type, K * = nullptr>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( const_iterator ,
key_arg< K > && k,
const V & v )
inline

Definition at line 480 of file linked_hash_map.h.

◆ insert_or_assign() [6/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type, K * = nullptr, V * = nullptr>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( const_iterator ,
key_arg< K > && k,
V && v )
inline

Definition at line 475 of file linked_hash_map.h.

◆ insert_or_assign() [7/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type, K * = nullptr>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( key_arg< K > && k,
const V & v )
inline

Definition at line 459 of file linked_hash_map.h.

◆ insert_or_assign() [8/8]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class V = mapped_type, K * = nullptr, V * = nullptr>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::insert_or_assign ( key_arg< K > && k,
V && v )
inline

The last two template parameters ensure that both arguments are rvalues (lvalue arguments are handled by the overloads below). This is necessary for supporting bitfield arguments.

union { int n : 1; }; linked_hash_map<int, int> m; m.insert_or_assign(n, n);

Definition at line 454 of file linked_hash_map.h.

◆ key_eq()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
key_equal gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::key_eq ( ) const
inline

Definition at line 310 of file linked_hash_map.h.

◆ load_factor()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
float gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::load_factor ( ) const
inline

Definition at line 307 of file linked_hash_map.h.

◆ max_size()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
size_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::max_size ( ) const
inlinenoexcept

Definition at line 274 of file linked_hash_map.h.

◆ merge() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<typename H , typename E >
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::merge ( linked_hash_map< Key, Value, H, E, Alloc > && src)
inline

Definition at line 534 of file linked_hash_map.h.

◆ merge() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<typename H , typename E >
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::merge ( linked_hash_map< Key, Value, H, E, Alloc > & src)
inline

Definition at line 522 of file linked_hash_map.h.

◆ operator=() [1/3]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
linked_hash_map & gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::operator= ( const linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & other)
inline

Make a new set, with other's hash/eq/alloc.

Copy the list, with other's allocator.

Definition at line 246 of file linked_hash_map.h.

◆ operator=() [2/3]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
linked_hash_map & gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::operator= ( linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > && other)
inlinenoexcept

underlying containers will handle progagate_on_container_move details

Definition at line 257 of file linked_hash_map.h.

◆ operator=() [3/3]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
linked_hash_map & gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::operator= ( std::initializer_list< value_type > values)
inline

Definition at line 266 of file linked_hash_map.h.

◆ operator[]() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type>
mapped_type & gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::operator[] ( const key_arg< K > & key)
inline

Definition at line 400 of file linked_hash_map.h.

◆ operator[]() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, K * = nullptr>
mapped_type & gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::operator[] ( key_arg< K > && key)
inline

Definition at line 405 of file linked_hash_map.h.

◆ pop_back()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::pop_back ( )
inline

Definition at line 297 of file linked_hash_map.h.

◆ pop_front()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::pop_front ( )
inline

Definition at line 296 of file linked_hash_map.h.

◆ rbegin() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
reverse_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::rbegin ( )
inline

Definition at line 285 of file linked_hash_map.h.

◆ rbegin() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_reverse_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::rbegin ( ) const
inline

Definition at line 287 of file linked_hash_map.h.

◆ rehash()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::rehash ( size_t n)
inline

Definition at line 581 of file linked_hash_map.h.

◆ rend() [1/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
reverse_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::rend ( )
inline

Definition at line 286 of file linked_hash_map.h.

◆ rend() [2/2]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
const_reverse_iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::rend ( ) const
inline

Definition at line 288 of file linked_hash_map.h.

◆ reserve()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::reserve ( size_t n)
inline

Definition at line 304 of file linked_hash_map.h.

◆ size()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
size_type gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::size ( ) const
inline

Derive size_ from set_, as list::size might be O(N).

Definition at line 273 of file linked_hash_map.h.

◆ swap()

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
void gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::swap ( linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & other)
inline

Definition at line 557 of file linked_hash_map.h.

◆ try_emplace() [1/3]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, typename... Args>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::try_emplace ( const key_arg< K > & key,
Args &&... args )
inline

Definition at line 553 of file linked_hash_map.h.

◆ try_emplace() [2/3]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, class... Args, K * = nullptr>
iterator gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::try_emplace ( const_iterator ,
key_arg< K > && k,
Args &&... args )
inline

Definition at line 506 of file linked_hash_map.h.

◆ try_emplace() [3/3]

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
template<class K = key_type, typename... Args, K * = nullptr>
std::pair< iterator, bool > gtl::linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc >::try_emplace ( key_arg< K > && key,
Args &&... args )
inline

Definition at line 516 of file linked_hash_map.h.

Friends And Related Symbol Documentation

◆ operator!=

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
bool operator!= ( const linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & a,
const linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & b )
friend

Definition at line 577 of file linked_hash_map.h.

◆ operator==

template<typename Key , typename Value , typename KeyHash = typename absl::flat_hash_set<Key>::hasher, typename KeyEq = typename absl::flat_hash_set<Key, KeyHash>::key_equal, typename Alloc = std::allocator<std::pair<const Key, Value>>>
bool operator== ( const linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & a,
const linked_hash_map< Key, Value, KeyHash, KeyEq, Alloc > & b )
friend

Definition at line 563 of file linked_hash_map.h.


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