ATLAS Offline Software
|
Allow overriding the default hash function used within NavigationToken. More...
#include <functional>
Go to the source code of this file.
Classes | |
struct | NavigationTokenHash< CHILD > |
Functions | |
std::size_t | navigationHash (const void *p) |
Allow overriding the default hash function used within NavigationToken. More... | |
Allow overriding the default hash function used within NavigationToken.
Definition in file NavigationTokenHash.h.
|
inline |
Allow overriding the default hash function used within NavigationToken.
NavigationToken relies on iterating over a hash table to define the order of the iteration. Since we use pointers as keys, and pick up the default C++ function for pointers, that means that the order of iteration may not be reproducible from run to run.
If this matters, you can define an alternate hash function that depends on the object contents, rather than on the pointer value. You can specify this as the HASH template argument to NavigationToken; or, to change the default for all uses of the type, you can add an override for navigationHash or a specialization for NavigationTokenHash.
Definition at line 39 of file NavigationTokenHash.h.