std::unordered_map<std::string,std::string> mymap;
mymap.insert(std::make_pair("ELEMENTTYPE", "NEWINTERFACE"));
mymap.insert(std::make_pair("STYLEFILE", "Style_Light.txt"));
mymap.insert(std::make_pair("ELEMENTNAME", "IN1"));
mymap.insert(std::make_pair("POSITIONX", "0"));
mymap.insert(std::make_pair("POSITIONY", "0"));
mymap.insert(std::make_pair("SIZEX", "50"));
mymap.insert(std::make_pair("SIZEY", "50"));
I expected the map to have those elements in that order, but instead, it is :
-SIZEY
-ELEMENTTYPE
-STYLEFILE
-SIZEX
-POSITIONX
-POSITIONY
I am very confused; why is the std::unordered_map
ordering my elements?