carb::hashPair

Defined in carb/BindingsUtils.h

template<class T1, class T2>
inline size_t carb::hashPair(T1 t1, T2 t2)

A helper function for combining two hash values.

Effectively:

std::size_t res = 0;
using std::hash;
res = carb::hashCombine(res, hash<T1>{}(t1));
res = carb::hashCombine(res, hash<T2>{}(t2));
return res;

See also

hashCombine()

Template Parameters
  • T1 – A type to hash.

  • T2 – A type to hash.

Parameters
  • t1 – A value to hash.

  • t2 – A value to hash.

Returns

A hash combined from t1 and t2.