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
{{ message }}
Repository navigation
[FEA] Use heterogenous lookup instead of per-function key equal/hash #26
Is your feature request related to a problem? Please describe.
Sometimes we want to insert/find key types that may be different from the static_map::key_type. To support that today, we allow specifying a custom and independent key_equal and hash operations for insert and find. This is potentially quite problematic as it allows passing in different and conflicting notions of hashing and equality that could be incompatible and lead to undefined behavior.
A cleaner way to support the usecase of doing insert/find operations with different key types is via "heterogenous lookup".
In this way, the KeyEqual and Hash types would be specified only once as part of the static_map class template types, but it would allow those function's operators to be templates. This should require explicit user opt-in using the is_transparent trait.
Activity
PointKernel commentedon Jan 9, 2024
Solved during the grand refactoring