Blender  V3.3
Public Member Functions | List of all members
blender::DefaultHash< T > Struct Template Reference

#include <BLI_hash.hh>

Public Member Functions

uint64_t operator() (const T &value) const
 
template<typename U >
uint64_t operator() (const U &value) const
 

Detailed Description

template<typename T>
struct blender::DefaultHash< T >

If there is no other specialization of #DefaultHash for a given type, look for a hash function on the type itself. Implementing a hash() method on a type is often significantly easier than specializing #DefaultHash.

To support heterogeneous lookup, a type can also implement a static hash_as(const OtherType &) function.

In the case of an enum type, the default hash is just to cast the enum value to an integer.

Definition at line 83 of file BLI_hash.hh.

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
uint64_t blender::DefaultHash< T >::operator() ( const T value) const
inline

Definition at line 84 of file BLI_hash.hh.

◆ operator()() [2/2]

template<typename T >
template<typename U >
uint64_t blender::DefaultHash< T >::operator() ( const U value) const
inline

Definition at line 97 of file BLI_hash.hh.


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