RPNX::QueryGraph
Typed, memoized, concurrent query evaluation for C++23
Loading...
Searching...
No Matches
rpnx::querygraph::hasher< T > Struct Template Reference

Hash a value for use as a QueryGraph memoization key. More...

#include <hasher.hpp>

Public Member Functions

auto operator() (T const &value) const -> std::size_t
 Compute the hash of a query input.
 

Detailed Description

template<typename T>
struct rpnx::querygraph::hasher< T >

Hash a value for use as a QueryGraph memoization key.

Most values are hashed through rpnx::serial4::hash, keeping the cache key consistent with QueryGraph's serialization model. std::type_index uses its standard-library hash because it represents process-local type identity rather than serialized application data.

Applications may specialize this class template for input types that are not supported by the default serialization hash.

Template Parameters
TValue type to hash.

Definition at line 33 of file hasher.hpp.

Member Function Documentation

◆ operator()()

template<typename T>
auto rpnx::querygraph::hasher< T >::operator() ( T const & value) const -> std::size_t
inline

Compute the hash of a query input.

Parameters
valueValue to hash.
Returns
Hash value suitable for the configured cache backend.

Definition at line 40 of file hasher.hpp.


The documentation for this struct was generated from the following file: