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
tsl::hopscotch_map already provides heterogeneous overloads for lookup (e.g. via find or at) but there is currently no such support for adding elements (e.g. via operator[] or try_emplace). AFAIK, corresponding overloads were added to
the standard associative containers with C++26.
@Tessil Do you think it makes sense to also extend tsl::hopscotch_map? From what I can see, it seems that the underlying tsl::hopscotch_hash already has the necessary functionality, so I drafted a first version for try_emplace and operator[]here. I only extended tsl::hopscotch_map as tsl::bhopscotch_map seems to sometimes copy keys anyways.
If you think this makes sense, I could also open a PR.
The text was updated successfully, but these errors were encountered:
tsl::hopscotch_map
already provides heterogeneous overloads for lookup (e.g. viafind
orat
) but there is currently no such support for adding elements (e.g. viaoperator[]
ortry_emplace
). AFAIK, corresponding overloads were added tothe standard associative containers with C++26.
@Tessil Do you think it makes sense to also extend
tsl::hopscotch_map
? From what I can see, it seems that the underlyingtsl::hopscotch_hash
already has the necessary functionality, so I drafted a first version fortry_emplace
andoperator[]
here. I only extendedtsl::hopscotch_map
astsl::bhopscotch_map
seems to sometimes copy keys anyways.If you think this makes sense, I could also open a PR.
The text was updated successfully, but these errors were encountered: