Heterogeneous Lookup in Ordered Containers, C++14 Feature - C++ Stories
If you have a map of strings, like std::map<std::string, int> m; and you want to find some element by m.find("abc"). Do you have to pay the price and construct a std::string object? Can you optimize it?
Let’s have a look at one feature enabled in C++14 that might help optimize such container access.
Heterogeneous Lookup in Ordered Containers, C++14 Feature - C++ Stories
If you have a map of strings, like std::map<std::string, int> m; and you want to find some element by m.find("abc"). Do you have to pay the price and construct a std::string object? Can you optimize it? Let’s have a look at one feature enabled in C++14 that might help optimize such container access.
https://www.cppstories.com/2019/05/heterogeneous-lookup-cpp14/