Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::hash_fct_detail Namespace Reference

Functions

template<typename Key , typename Data >
auto map_hash_of (size_t(*fct)(const Key &)) noexcept
 The hash function of the pairs of a map, from that of its keys.
 

Function Documentation

◆ map_hash_of()

template<typename Key , typename Data >
auto Aleph::hash_fct_detail::map_hash_of ( size_t(*)(const Key &)  fct)
inlinenoexcept

The hash function of the pairs of a map, from that of its keys.

Template Parameters
KeyThe type of the keys.
DataThe type of the values.
Parameters
[in]fctThe hash function of the keys.
Returns
A function object that gives, for a pair, the hash that fct gives for its key.
Note
The object holds only the pointer fct, so that the std::function of a hash table keeps it in its own buffer: its copies do not allocate, as those of a std::bind of map_hash_fct() do.

Definition at line 1157 of file hash-fct.H.