Before C++14, looking up elements in an ordered container was only possible using the type matching the key.
Because of this, lookups using a non-matching type required conversion and construction of a temporary key.
Notably, for std::string, this typically also means an allocation.
Compiler Explorer link: https://compiler-explorer.com/z/vooYhvGcc