From 8a53139f94bdea60099723528079a6a514764f3a Mon Sep 17 00:00:00 2001 From: Frank Stein Date: Sat, 22 Oct 2016 00:04:15 +0200 Subject: std::hash for const Entity implemented. --- entityx/Entity.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/entityx/Entity.h b/entityx/Entity.h index 9fcf676..e4a3871 100644 --- a/entityx/Entity.h +++ b/entityx/Entity.h @@ -1079,5 +1079,11 @@ template <> struct hash { return static_cast(entity.id().index() ^ entity.id().version()); } }; + +template <> struct hash { + std::size_t operator () (const entityx::Entity &entity) const { + return static_cast(entity.id().index() ^ entity.id().version()); + } +}; } -- cgit v1.2.3