Return the first node matching key with transparent equality, or null.

Synopsis

Declared in <bslalg_hashtableimputil.h>

template<
    class KEY_CONFIG,
    class LOOKUP_KEY,
    class KEY_EQUAL>
static
BidirectionalLink*
findTransparent(
    HashTableAnchor const& anchor,
    LOOKUP_KEY const& key,
    KEY_EQUAL const& equalityFunctor,
    std::size_t hashCode);

Description

Return the address of the first link in the list element of the specified anchor having a value matching (according to the specified transparent equalityFunctor) the specified key in the bucket that holds elements with the specified hashCode if such a link exists, and return 0 otherwise. The behavior is undefined unless, for the provided KEY_CONFIG and some hash function, HASHER, anchor is well‐formed (see isWellFormed) and HASHER(key) returns hashCode. KEY_CONFIG shall be a namespace providing the type names KeyType and ValueType, as well as a function that can be called as if it had the following signature: ` const KeyType& extractKey(const ValueType& obj); ` KEY_EQUAL shall be a functor that can be called as if it had the following signature: ` bool operator()(const LOOKUP_KEY& key1, const KEY_CONFIG::KeyType& key2)

`

Return Value

address of the matching link, or 0 if none

Parameters

Name

Description

anchor

hash table to search

key

lookup key compared using the transparent equality functor

equalityFunctor

transparent predicate comparing key to stored keys

hashCode

non‐adjusted hash code of key

Created with MrDocs