Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Heterogeneous lookup #72

Merged
merged 4 commits into from
Jun 18, 2020
Merged

Conversation

gergondet
Copy link
Contributor

This PR implements heterogeneous lookup in robin_hood::unordered_set and 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.

I've also added heterogeneous "overloads" for count and contains

A unit test is added to check the newly added code and that no conversion happens thanks to the heterogeneous lookup.

@martinus martinus merged commit b6e996e into martinus:master Jun 18, 2020
@martinus
Copy link
Owner

Thanks a lot for this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants