This is a simple struct that features the use of std::type_info as key values of container types like hash tables and sets. For this, this struct provides inner functors hash, equal_to and less.
If for example a std::unordered_map should be instantiated with run-time type information as the hash key, a definition looks as follows:
std::unordered_map<TypeFunctors::Key, MyMappedType,
TypeFunctors::Hash,
TypeFunctors::EqualTo > myMap;
Note that the key type evaluates to const std::type_info*, hence pointers to the structs have to be given when interfacing with the container.
Definition at line 25 of file stdtypeinfofunctors.inl.
Inner Type Index: | |
| struct | EqualTo |
Comparison functor for type const std::type_info*. More... | |
| struct | Hash |
Hash code functor for type const std::type_info*. More... | |
| struct | Less |
Comparison functor for type const std::type_info*. More... | |
Public Type Index: | |
| using | Key = const ::std::type_info* |
| The key type. | |
| using alib::lang::TypeFunctors::Key = const ::std::type_info* |
The key type.
Definition at line 28 of file stdtypeinfofunctors.inl.