martinus / unordered_dense

A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion
MIT License
898 stars 72 forks source link

New API: Similar to EASTL::hash_map::find_as #106

Closed ArnoChenFx closed 9 months ago

ArnoChenFx commented 9 months ago

I would like to request the addition of a new API that is similar to EASTL::hash_map::find_as. This new API would provide a convenient way to search for a specific value in an unordered_dense::map using a custom comparison function.

references: https://github.com/electronicarts/EASTL/blob/05f4b4aef33f2f3ded08f19fa97f5a27ff35ff9f/include/EASTL/hash_map.h#L84 https://github.com/electronicarts/EASTL/blob/05f4b4aef33f2f3ded08f19fa97f5a27ff35ff9f/include/EASTL/internal/hashtable.h#L1075

martinus commented 9 months ago

I don't think that is needed, this can be done with is_transparent feature. See here: https://github.com/martinus/unordered_dense#324-heterogeneous-overloads-using-is_transparent