Your problem is that the value_type of std :: map <std :: string, int> is not std :: pair <std :: string, Int>. This is std :: pair <const std :: string, int>. Pay attention to the constant on the key. This works great:
std::map<std::string, int> container;
void myMap(std::initializer_list<std::pair<const std::string, int>> input) {
container = input;
}
, std:: copy, _type . , , , , myMap, otherGuysMap:).