Open CASCADE Technology 7.9.0
NCollection_DefineHasher.hxx File Reference

Macros

#define DEFINE_HASHER(HasherName, TheKeyType, HashFunctor, EqualFunctor)
 

Macro Definition Documentation

◆ DEFINE_HASHER

#define DEFINE_HASHER ( HasherName,
TheKeyType,
HashFunctor,
EqualFunctor )
Value:
struct HasherName : protected HashFunctor, EqualFunctor \
{ \
size_t operator()(const TheKeyType& theKey) const noexcept \
{ \
return HashFunctor::operator()(theKey); \
} \
\
bool operator()(const TheKeyType& theK1, const TheKeyType& theK2) const noexcept \
{ \
return EqualFunctor::operator()(theK1, theK2); \
} \
};