HashCompare¶
[req.hash_compare]
HashCompare is an object which is used to calculate hash code for an object and compare two objects for equality.
The type H satisfies HashCompare if it meets the following requirements:
HashCompare Requirements: Pseudo-Signature, Semantics
-
H::~H()¶ Destructor
-
std::size_t
H::hash(const KeyType &k)¶ Calculates the hash for provided key.
-
ReturnType
H::equal(const KeyType &k1, const KeyType &k2)¶ Requirements:
The type
ReturnTypeshould be implicitly convertible tobool
Compares
k1andk2for equality.If this function returns
truethenH::hash(k1)should be equal toH::hash(k2).