I started on an unordered_map from pair<EntityId, EntityId> to Collision, but creating a explicit specialization of hash<pair<EntityId,EntityId>> being symmetric could cause a bit of confusion in rare cases for includers of the header.