smats  0.0.1
Satisfability Modulo Arithmetic Theories Symbols
Loading...
Searching...
No Matches
smats::InvocableHashAlgorithm Concept Reference

#include <concepts.h>

Concept definition

template<class T>
concept smats::InvocableHashAlgorithm = requires(T t, const void* data, size_t length) {
typename T::result_type;
{ t(data, length) } noexcept -> std::same_as<void>;
{ size_t() } noexcept -> std::same_as<typename T::result_type>;
}
Definition concepts.h:88

Detailed Description

Check if the type T supports the same operation one could expect a typical hash algorithm to support:

  • a result_type alias that defines the type of the hash value
  • void operator()(const void*, size_t) noexcept
    applies the hash function to the data and append the result to the hash
  • operator result_type () noexcept
    returns the current hash value when casted to the result type
    Template Parameters
    Ttype to check