Template Class HashableKeys

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 explicit HashableKeys(T1 key1)

Construct an instance.

Parameters:

key1 – first argument.

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.

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.

inline bool operator<(const HashableKeys<T1, T2, T3, T4, T5, T6> &rhs) const

Compare with other keys.

Parameters:

rhs – Comparison target.

Returns:

True if rhs is greater, false otherwise.

inline T1 first() const

Get first argument.

Returns:

First argument.

inline T2 second() const

Get second argument.

Returns:

Second argument.

inline T3 third() const

Get third argument.

Returns:

Third argument.

inline T4 fourth() const

Get fourth argument.

Returns:

Fourth argument.

inline T5 fifth() const

Get fifth argument.

Returns:

Fifth argument.

inline T6 sixth() const

Get sixth argument.

Returns:

Sixth argument.