hash Struct Template
Hash specialization for EntityHandle. More...
Declaration
template <typename TDomainTag>
struct std::hash<helios::ecs::types::EntityHandle< TDomainTag >> { ... }
Public Operators Index
template <typename TDomainTag> | |
| std::size_t | operator() (const helios::ecs::types::EntityHandle< TDomainTag > &handle) const noexcept |
Description
Hash specialization for EntityHandle.
Packs entityId and versionId into a 64-bit value for hashing.
Definition at line 118 of file EntityHandle.ixx.
Public Operators
operator()()
template <typename TDomainTag>
| inline noexcept |
Definition at line 119 of file EntityHandle.ixx.
119 std::size_t operator()(const helios::ecs::types::EntityHandle<TDomainTag>& handle) const noexcept {
120
121 const uint64_t packed = (static_cast<uint64_t>(handle.entityId) << 32) |
122 static_cast<uint64_t>(handle.versionId);
123
124 return std::hash<uint64_t>{}(packed);
125 }
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.