JH-Toolkit v1.4.1
An engineering-oriented C++20 toolkit with duck-typed concepts, static design, async coroutines, and semantic containers — header-only, RTTI-free, and concurrency-friendly.
Loading...
Searching...
No Matches
jh::concepts::has_std_hash Concept Reference

Checks whether std::hash<T> is valid and callable. More...

#include <jh/conceptual/hashable.h>

Concept definition

template<typename T>
concept has_std_hash = requires(const T& v) {
{ std::hash<T>{}(v) } -> std::convertible_to<size_t>;
}
Checks whether std::hash<T> is valid and callable.
Definition hashable.h:79

Detailed Description

Checks whether std::hash<T> is valid and callable.

Equivalent to:

{ std::hash<T>{}(v) } -> std::convertible_to<size_t>;