WTF
HashFunctions.h
Go to the documentation of this file.
94 static unsigned hash(T key) { return intHash(static_cast<typename IntTypes<sizeof(T)>::UnsignedType>(key)); }
100 static unsigned hash(T key) { return intHash(*reinterpret_cast<typename IntTypes<sizeof(T)>::UnsignedType*>(&key)); }
112 #pragma warning(disable: 4244) // work around what seems to be a bug in MSVC's conversion warnings
138 return intHash((static_cast<uint64_t>(DefaultHash<T>::Hash::hash(p.first)) << 32 | DefaultHash<U>::Hash::hash(p.second)));
142 return DefaultHash<T>::Hash::equal(a.first, b.first) && DefaultHash<U>::Hash::equal(a.second, b.second);
144 static const bool safeToCompareToEmptyOrDeleted = DefaultHash<T>::Hash::safeToCompareToEmptyOrDeleted
157 template<> struct DefaultHash<unsigned long long> { typedef IntHash<unsigned long long> Hash; };
171 template<typename T, typename U> struct DefaultHash<std::pair<T, U> > { typedef PairHash<T, U> Hash; };
Definition: HashFunctions.h:135
Definition: HashFunctions.h:133
static const bool safeToCompareToEmptyOrDeleted
Definition: HashFunctions.h:102
Definition: HashFunctions.h:99
IntHash< unsigned long long > Hash
Definition: HashFunctions.h:157
Definition: HashFunctions.h:107
static bool equal(const std::pair< T, U > &a, const std::pair< T, U > &b)
Definition: HashFunctions.h:140
Definition: Forward.h:31
static bool equal(const RefPtr< P > &a, const RefPtr< P > &b)
Definition: HashFunctions.h:126
IntHash< unsigned long long > Hash
Definition: HashFunctions.h:156
static const bool safeToCompareToEmptyOrDeleted
Definition: HashFunctions.h:144
static const bool safeToCompareToEmptyOrDeleted
Definition: HashFunctions.h:120
Definition: HashFunctions.h:33
static const bool safeToCompareToEmptyOrDeleted
Definition: HashFunctions.h:96
static unsigned hash(const RefPtr< P > &key)
Definition: HashFunctions.h:124
static bool equal(P *a, const RefPtr< P > &b)
Definition: HashFunctions.h:127
Definition: HashFunctions.h:93
static bool equal(const RefPtr< P > &a, P *b)
Definition: HashFunctions.h:128
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.