|
BDE 4.39.x Production Release
|
Provide hashAppend for std::thread::id.
Provide hashAppend for std::thread::id.
This component provides a free function template, bslh::hashAppend, overloaded for the std::thread::id type. Including this function allows for std::thread::id (and types that contain members of that type) to be used as keys in BDE hashed containers.
This section illustrates intended usage of this component.
Suppose we have a struct with an int member and a std::thread::id member:
To implement hashAppend for this struct, we would feed its first member, then its second, to hashAppend. This is made possible by the fact that this component provides an overload that accepts std::thread::id.
We can now use our new hashAppend overload: