CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
Loading...
Searching...
No Matches
util::cache::CacheKeyElement Concept Reference

What one element of a cache key must support: equality, hashing, and being copyable — the key is copied into a tuple and again into the map. Element-wise on purpose: TupleHash's operator() takes any tuple and fails inside its body, so constraining it would constrain nothing. More...

#include <cache.hpp>

Concept definition

template<typename T>
concept util::cache::CacheKeyElement = std::equality_comparable<T>
and std::default_initializable<std::hash<T>>
and std::invocable<std::hash<T>&, const T&>
and std::copy_constructible<T>
What one element of a cache key must support: equality, hashing, and being copyable — the key is copi...
Definition cache.hpp:40

Detailed Description

What one element of a cache key must support: equality, hashing, and being copyable — the key is copied into a tuple and again into the map. Element-wise on purpose: TupleHash's operator() takes any tuple and fails inside its body, so constraining it would constrain nothing.