hash Struct Template
Hash specialization for EntityHandle. More...
Declaration
template <typename TStrongId>
struct std::hash<helios::core::ecs::EntityHandle< TStrongId >> { ... }
Public Operators Index
template <typename TStrongId> | |
| std::size_t | operator() (const helios::core::ecs::EntityHandle< TStrongId > &handle) const noexcept |
Description
Hash specialization for EntityHandle.
Packs entityId and versionId into a 64-bit value for hashing.
Definition at line 98 of file EntityHandle.ixx.
Public Operators
operator()()
template <typename TStrongId>
| inline noexcept |
Definition at line 99 of file EntityHandle.ixx.
99 std::size_t operator()(const helios::core::ecs::EntityHandle<TStrongId>& handle) const noexcept {
100
101 const uint64_t packed = (static_cast<uint64_t>(handle.entityId) << 32) |
102 static_cast<uint64_t>(handle.versionId);
103
104 return std::hash<uint64_t>{}(packed);
105 }
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.