• Xiao Shi's avatar
    heterogeneous lookup for ConcurrentHashMap · 47a169a1
    Xiao Shi authored
    Summary:
    This diff adds heterogeneous lookup handling for `ConcurrentHashMap` (`find()`
    and `at()`), which allows lookups on keys that the hasher and key equal
    functors accept but are not exactly the same as the `KeyType` of the map.
    Common usage of the feature include looking up with a `std::string_view` key in
    a `map<string, X>`, thereby avoiding creating an unnecessary temporary string
    object.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D25250409
    
    fbshipit-source-id: 78dad163d623794b179c1691180b54cf109784ee
    47a169a1
ConcurrentHashMap.h 20 KB