cgrapht 1.0.0
A modern C++20 header-only graph library
Loading...
Searching...
No Matches
cgrapht::Hashable Concept Reference

Concept for types hashable by std::hash. More...

#include <commons.hpp>

Concept definition

template<typename T>
concept cgrapht::Hashable = requires(T a) {
{ std::hash<T>{}(a) } -> std::convertible_to<std::size_t>;
}
Concept for types hashable by std::hash.
Definition commons.hpp:21

Detailed Description

Concept for types hashable by std::hash.

This concept is used in the graph definition to ake sure that all vertex and edge types are actually hashable. Hashability is at the core of the design of this library.

Template Parameters
TCandidate type.

Definition at line 21 of file commons.hpp.