|
OpenTTD Source 15.0-RC2
|
Implementation of std::hash for StrongType::Typedef. More...
#include <strong_typedef_type.hpp>
Public Member Functions | |
| std::size_t | operator() (const StrongType::Typedef< TBaseType, TProperties... > &t) const noexcept |
| Computes the hash value for a StrongType::Typedef instance. | |
Implementation of std::hash for StrongType::Typedef.
This specialization of std::hash allows hashing of StrongType::Typedef instances by leveraging the hash of the base type.
Example Usage: using MyType = StrongType::Typedef<int, struct MyTypeTag>; std::unordered_map<MyType, std::string> my_map;
| TBaseType | The underlying type of the StrongType::Typedef. |
| TProperties | Additional properties for the StrongType::Typedef. |
Definition at line 175 of file strong_typedef_type.hpp.
|
inlinenoexcept |
Computes the hash value for a StrongType::Typedef instance.
| t | The StrongType::Typedef instance to hash. |
Definition at line 182 of file strong_typedef_type.hpp.