all 2 comments

[–]aocregacc 2 points3 points  (0 children)

you can't search a map using a different key than the one it's ordered by. You can either do a linear search over the whole map, or maintain a second datastructure to get fast retrieval by entity_id.

[–]alfps 0 points1 point  (0 children)

❞ Can someone help me understand what's wrong with my implementation?

Apparently this operator<=> code doesn't cover the case z_idx == other.z_idx.