dice-hash
Hash function for stl types and container
Loading...
Searching...
No Matches
Classes | Static Public Member Functions | List of all members
dice::hash::dice_hash_overload< Policy, T > Struct Template Reference

Helper struct for defining the hash for custom structs. More...

#include <DiceHash.hpp>

Classes

struct  AlwaysFalse
 Helper type. More...
 

Static Public Member Functions

static std::size_t dice_hash (T const &) noexcept
 Default implementation of the dice_hash function.
 

Detailed Description

template<Policies::HashPolicy Policy, typename T>
struct dice::hash::dice_hash_overload< Policy, T >

Helper struct for defining the hash for custom structs.

Because of partial specialization problems with functions, this struct must be specialized to define the hash for a custom type.

Template Parameters
PolicyThe policy to use.
TThe custom type.

Member Function Documentation

◆ dice_hash()

template<Policies::HashPolicy Policy, typename T >
static std::size_t dice::hash::dice_hash_overload< Policy, T >::dice_hash ( T const )
inlinestaticnoexcept

Default implementation of the dice_hash function.

It will simply not compile. For every type there should be an specific overload.

Template Parameters
TType of the value to hash.
Returns
Nothing. It WILL NOT compile.

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