|
CelestialCalendar 1.0.0 · unreleased development @ 67a7c4c79a4a4a6aa7e703c9e6f0039ae34bee82
|
Classes | |
| struct | TupleHash |
Concepts | |
| concept | CacheKeyElement |
| 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. | |
| concept | FunctionConvertible |
| Checks if a type can be converted to std::function. | |
Functions | |
| template<typename RetType, typename... Args> requires std::is_object_v<RetType> and std::copy_constructible<RetType> and (... and CacheKeyElement<std::decay_t<Args>>) | |
| auto | make_cached (const std::function< RetType(Args...)> &func) |
| A wrapper that caches the result of a function. | |
| auto | cache_func (const FunctionConvertible auto &func) |
| A wrapper that caches the result of a function. | |
|
inlinenodiscard |
A wrapper that caches the result of a function.
| func | The function to cache. |
|
inlinenodiscard |
A wrapper that caches the result of a function.
| func | The function to cache. Must be pure — same arguments ⇒ same result — and have a single, non-generic call signature (deduced through std::function). |