Enum member isHashFunction
Determines whether hasher is hash function for T, i.e. it is callable with a value of type T and returns a size_t value.
enum isHashFunction(alias hasher, T)
= is(typeof(wrapper(T .init)) == size_t);
Parameters
Name | Description |
---|---|
hasher | Hash function candidate. |
T | Type to test the hash function with. |
Returns
true if hasher is a hash function for T, false otherwise.
Example
static assert(isHashFunction!(hash, int));