You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you be interested in updating unordered_dense to support heterogeneous overloads outlined in the paper: cplusplus/papers#1037 (which seems like it is a go for C++26)
It can be helpful when trying to do a find on an object that the map doesn't directly support but can be looked up...but still requiring an insert of the real type if it doesn't exist.
Contrived example
Today:
ankerl::unordered_dense::map<std::string, int, StringHash, std::equal_to<>> map;
auto it = map.find(std::string_view{"hello world"});
if (it == map.end())
{
auto [ new_it, success ] = map.emplace(std::string{"hello world"}, 42);
it = new_it
}
// do something with it
Future:
ankerl::unordered_dense::map<std::string, int, StringHash, std::equal_to<>> map;
auto [ it, success ] = map.try_emplace(std::string_view{"hello world"}, 42);
// do something with it
The text was updated successfully, but these errors were encountered:
Would you be interested in updating
unordered_dense
to support heterogeneous overloads outlined in the paper: cplusplus/papers#1037 (which seems like it is a go for C++26)It can be helpful when trying to do a find on an object that the map doesn't directly support but can be looked up...but still requiring an insert of the real type if it doesn't exist.
Contrived example
Today:
Future:
The text was updated successfully, but these errors were encountered: