StormByte 2.0.0
C++26 foundation of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Type::Hashable Concept Reference

Type with a valid std::hash specialization. More...

#include <StormByte/type_traits/comparison.hxx>

Concept definition

template<typename T>
requires(std::remove_cvref_t<T> const& t) {
{ std::hash<std::remove_cvref_t<T>>{}(t) } -> std::convertible_to<std::size_t>;
}
Type with a valid std::hash specialization.
Definition comparison.hxx:112

Detailed Description

Type with a valid std::hash specialization.

Template Parameters
TType to test.
template<Type::Hashable T>
std::size_t hash_of(T const& value) { return std::hash<std::remove_cvref_t<T>>{}(value); }