Template Class HashableKeys
Defined in File keys_set.hpp
Class Documentation
-
template<typename T1, typename T2 = std::false_type, typename T3 = std::false_type, typename T4 = std::false_type, typename T5 = std::false_type, typename T6 = std::false_type>
class HashableKeys Tuple-like class that has hash() function.
- Template Parameters:
T1 – First argument type.
T2 – Second argument type.
T3 – Third argument type.
T4 – Fourth argument type.
T5 – Fifth argument type.
T6 – Sixth argument type.
Public Functions
-
inline HashableKeys(T1 key1, T2 key2)
Construct an instance.
- Parameters:
key1 – first argument.
key2 – second argument.
-
inline HashableKeys(T1 key1, T2 key2, T3 key3)
Construct an instance.
- Parameters:
key1 – first argument.
key2 – second argument.
key3 – third argument.
-
inline HashableKeys(T1 key1, T2 key2, T3 key3, T4 key4)
Construct an instance.
- Parameters:
key1 – first argument.
key2 – second argument.
key3 – third argument.
key4 – fourth argument.
-
inline HashableKeys(T1 key1, T2 key2, T3 key3, T4 key4, T5 key5)
Construct an instance.
- Parameters:
key1 – first argument.
key2 – second argument.
key3 – third argument.
key4 – fourth argument.
key5 – fifth argument.
-
inline HashableKeys(T1 key1, T2 key2, T3 key3, T4 key4, T5 key5, T6 key6)
Construct an instance.
- Parameters:
key1 – first argument.
key2 – second argument.
key3 – third argument.
key4 – fourth argument.
key5 – fifth argument.
key6 – sixth argument.
-
inline size_t hash() const
Calculate hash.
Note
For hash code implementations, see: https://www.baeldung.com/java-hashcode#standard-hashcode-implementations
- Returns:
hash value.
-
inline bool equal_to(const HashableKeys<T1, T2, T3, T4, T5, T6> &keys) const
Check for equivalence.
- Parameters:
keys – Comparison target.
- Returns:
True if equal, false otherwise.