This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
The return type of functions that use hints should be consistent with std #138
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The return types of the member functions that take a hint to insert an element are different between
robin_hood::unordered_map
andstd::unordered_map
.As a result, to use
robin_hood::unordered_map
, we need to do more than just replacestd::unordered_map
withrobin_hood::unordered_map
.I feel that this is preventing users from using
robot_hood::unordered_map
.What I would like to do with this pull request
Make the return type of member functions of
robin_hood::unordered_map
that take a hint to insert an element consistent withstd::unordered_map
.Specific proposals
The member functions of
robin_hood::detail::Table
that take a hint to insert an element are currently declared as follows.On the other hand, the corresponding functions of
std::unordered_map
are declared as follows.Reference: Working Draft, Standard for Programming Language C++ - ISO C++ standards committee
I would like to replace the above declaration with the one below.
Some may argue that making the above change makes it impossible to know whether an element was actually inserted or not.
If this slight difference between
robin_hood::unordered_map
andstd::unordered_map
is intentional, please abandon this proposal.Best regards.