Why is `std::unordered_map<std::string, T>` lookup using `std::string_view` not supported?
In C++14 this method was added to std::map: template< class K > iterator find( const K& x );. It allows you to lookup using std::string_view in a std::map<std::string, T>.
Why wasn't the concepts std::is_equality_comparable<T1, T2> and std::is_same_hash_projection<T1, T2> (std::hash(T1 v1) == std::hash(T2 v2) if v1 == v2) been added so we can have the same thing for std::unordered_map?
12 comments · 54% upvoted · other discussions
string_view<> isn't fully integrated everywhere in the library. This could have been an oversight, although it's possible there was a reason it was omitted.
I'd ask on the public reflectors.