Closed gergondet closed 4 years ago
This PR implements heterogeneous lookup in robin_hood::unordered_set and robin_hood::unordered_map.
robin_hood::unordered_set
robin_hood::unordered_map
As hinted in #39 this is based on P1690R0 which means it is enabled if both the provided Hash and KeyEqual types have an is_transparent tag.
Hash
KeyEqual
is_transparent
I've also added heterogeneous "overloads" for count and contains
count
contains
A unit test is added to check the newly added code and that no conversion happens thanks to the heterogeneous lookup.
Thanks a lot for this!
This PR implements heterogeneous lookup in
robin_hood::unordered_set
androbin_hood::unordered_map
.As hinted in #39 this is based on P1690R0 which means it is enabled if both the provided
Hash
andKeyEqual
types have anis_transparent
tag.I've also added heterogeneous "overloads" for
count
andcontains
A unit test is added to check the newly added code and that no conversion happens thanks to the heterogeneous lookup.