Hash¶
-
template<typename TValueType, typename TSfinae = void>
struct libsemigroups::Hash¶ Adapter for hashing.
Defined in
adapters.hpp
.This type should be a stateless trivially default constructible with a call operator of signature
size_t operator()(TValueType const&)
for use with, for example, std::unordered_map.- Template Parameters
TValueType – the type of objects to compare.
TSfinae – this template parameter can be used for SFINAE.
Public Functions
-
inline size_t operator()(TValueType const &x) const¶
This call operator hashes
x
using std::hash with template parameterTValueType
.- Parameters
x – the value to hash
- Returns
A hash value for
x
, a value of typesize_t
.