-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional heterogeneous overloads. #63
Conversation
* Add heterogeneous overloads for try_emplace, insert_or_assign, and operator[] to {b}hopscotch_map and hopscotch_hash. * Similar overloads were added to the standard associative containers with C++26 (see P2363R5).
Thanks, it looks good. Few comments:
Thanks |
* Add heterogeneous insert overloads to {b}hopscotch_set. * Adjust doc comment on new overloads. * Replace std::is_convertible_v with std::is_convertible::value in try_emplace overloads as the former was only added in C++17. * Simplify tests.
Done.
Done.
I don't think that we can remove the |
Thank you for the change and sorry for the delay.
Sorry, I meant to only have I just want to avoid incoherences in the API were some heterogeneous methods require only |
Sorry, I'm not sure I can follow:
Could you please clarify your concerns so that I can update this PR again if needed? |
Sorry if I was unclear, it seems some |
* Restore std::is_convertible<K&&, iterator> constraint.
Given that |
Sorry for the review delay and thanks for your patience. It looks good to me in general. Just a bit worried about the I merged the change. Thanks again for your contribution. |
I understand your concern and drafted an alternative approach: master...BenKaufmann:hopscotch-map:simplify-unit-tests. |
Add heterogeneous overloads for try_emplace, insert_or_assign, and operator[] to {b}hopscotch_map and hopscotch_hash.
Similar overloads were added to the standard associative containers with C++26 (see P2363R5).