template<typename key_t>
struct xtd::collections::generic::helpers::hasher< key_t >
Implements a function object for hashing data.
Implements a function object for hashing data.
Definition hasher.hpp:38
- Header
#include <xtd/collections/hasher
- Namespace
- xtd::collections::generic
- Library
- xtd.core
- Examples
- The following example show how to use xtd::collections::generic::helpers::hasher with
std::unordered_map
.
key_values.insert({{1971, 1, 5}, "Birth date"});
std::allocator< type_t > allocator
Represent an allocator alias.
Definition allocator.hpp:35
Implements a function object for performing comparisons. Unless specialised, invokes operator== on ty...
Definition equator.hpp:37
|
size_t | operator() (const key_t &key) const |
| Serves as a hash function for a specified key with a particular type (type_t).
|
|
◆ operator()()
template<typename key_t >
Serves as a hash function for a specified key with a particular type (type_t).
- Parameters
-
- Returns
- A hash code for the spesified key.
The documentation for this struct was generated from the following file:
- xtd.core/include/xtd/collections/generic/helpers/hasher.hpp