ImFusion SDK 4.3
GenericHasher< T, PointerToMember > Struct Template Reference

#include <ImFusion/Core/Hashing.h>

STL-compatible hasher for custom classes where you list the members to be hashed as template parameters. More...

Detailed Description

template<typename T, auto... PointerToMember>
struct ImFusion::Hashing::GenericHasher< T, PointerToMember >

STL-compatible hasher for custom classes where you list the members to be hashed as template parameters.

Internally uses combineHash() on all members of the class that are defined through pointer-to-members in the template parameter pack.

Template Parameters
TType of the struct/class to be hashed.
PointerToMemberList of pointer-to-member declarations of members of T that should be hashed. The corresponding types must be hashable with std::hash<>.

Example usage:

struct Foo
{
int i = 0;
double d = 0.0;
bool operator==(const Foo& rhs) const { ... }
};
hashMap.insert({Foo{42, 13.37, "Hello"}, 22});
T insert(T... args)
See also
genericHash()

Public Member Functions

std::size_t operator() (const T &t) const
 

The documentation for this struct was generated from the following file:
Search Tab / S to search, Esc to close