qxLib
Functions
hash.h File Reference
#include <cstddef>

Go to the source code of this file.

Functions

template<typename T >
constexpr size_t qx::get_hash (const T &value) noexcept
 Get an object hash. More...
 
template<typename T >
constexpr void qx::hash_combine (size_t &seed, const T &value) noexcept
 Combine hashes. More...
 

Detailed Description

Author
Khrapov
Date
18.08.2025

Definition in file hash.h.

Function Documentation

◆ get_hash()

template<typename T >
constexpr size_t qx::get_hash ( const T &  value)
constexprnoexcept

Get an object hash.

A simple wrapper over std::hash that removes the need to specify the type and unnecessary parentheses.

Template Parameters
T- object type
Parameters
value- object value
Return values
-object hash

Definition at line 25 of file hash.h.

◆ hash_combine()

template<typename T >
constexpr void qx::hash_combine ( size_t &  seed,
const T &  value 
)
constexprnoexcept

Combine hashes.

Template Parameters
T- object type
Parameters
seed- input/output hash value
value- object to hash

Definition at line 37 of file hash.h.