transparent proxy of string_view as key for associative containers.
sotrdg sotrdg
euloanty@live.com
Mon Nov 16 06:43:03 GMT 2020
The code fails to compile for both unordered_map and map. Is this a bug of libstdc++ or a defect of WG21?
#include<unordered_map>
#include<string>
#include<string_view>
#include<map>
int main()
{
std::unordered_map<std::string,std::string> umap;
std::string_view key{"a key"};
auto p{umap.find(key)};
std::map<std::string,std::string> map;
auto p1{map.find(key)};
}
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
More information about the Libstdc++
mailing list