51template<
typename Key_t,
typename Iterator_t,
bool IS_ITER_TO_PAIR>
143template<
typename Hash>
170 template<
typename Linked_hash_key_t>
171 size_t operator()(
const Linked_hash_key_t& val)
const;
184template<
typename Pred>
214 template<
typename Linked_hash_key_t>
215 bool operator()(
const Linked_hash_key_t& lhs,
const Linked_hash_key_t& rhs)
const;
222template<
typename Key_t,
typename Iterator_t,
bool IS_ITER_TO_PAIR>
229template<
typename Key_t,
typename Iterator_t,
bool IS_ITER_TO_PAIR>
236template<
typename Key_t,
typename Iterator_t,
bool IS_ITER_TO_PAIR>
240 using std::holds_alternative;
243 if (holds_alternative<Key_ptr>(m_key_hndl))
245 return *(get<Key_ptr>(m_key_hndl));
249 if constexpr(S_IS_ITER_TO_PAIR)
251 return get<Iterator>(m_key_hndl)->first;
255 return *(get<Iterator>(m_key_hndl));
259template<
typename Key_t,
typename Iterator_t,
bool IS_ITER_TO_PAIR>
263 return std::get<Iterator>(m_key_hndl);
269template<
typename Hash>
281template<
typename Hash>
282template<
typename Linked_hash_key_t>
285 return this->Hash::operator()(val.key());
290template<
typename Pred>
302template<
typename Pred>
303template<
typename Linked_hash_key_t>
306 return this->Pred::operator()(lhs.key(), rhs.key());
The internal-use Hash functor wrapper, used as the hasher type in internal-use set-type Linked_hash_k...
size_t operator()(const Linked_hash_key_t &val) const
Returns hash of val.key(), where val is a Linked_hash_key instance, using the saved hasher object.
Linked_hash_key_hash(const Hash &hasher=Hash{})
Saves a (typically data-free) copy of a given Linked_hash_map or Linked_hash_set hasher object,...
The internal-use Pred functor wrapper, used as the key-equality-determiner type in internal-use set-t...
bool operator()(const Linked_hash_key_t &lhs, const Linked_hash_key_t &rhs) const
Returns true if and only if lhs.key() and rhs.key() (where lhs and rhs are Linked_hash_key instances)...
Linked_hash_key_pred(const Pred &pred=Pred{})
Saves a (typically data-free) copy of a given Linked_hash_map or Linked_hash_set equality-determiner ...
The internal-use key/iterator-wrapper, used as the key type in internal-use set-type Linked_hash_key_...
const Key & key() const
Returns reference to immutable key to which we saved a pointer via one of our constructor forms.
std::variant< Key_ptr, Iterator > m_key_hndl
Stores the key, without copying its actual value, as either a pointer to an immutable key,...
Key_t Key
Convenience alias for template arg.
Linked_hash_key(const Key &key)
Constructs *this to contain a pointer to a Key living outside the *this-using data structure Linked_h...
static constexpr bool S_IS_ITER_TO_PAIR
Convenience alias for template arg.
Key const * Key_ptr
Short-hand for raw pointer to an immutable Key living outside the *this-using data structure.
Iterator iter() const
Assuming we were as-if constructed via the ctor that takes an Iterator (as opposed to a Key reference...
Iterator_t Iterator
Convenience alias for template arg.
Flow module containing miscellaneous general-use facilities that don't fit into any other Flow module...