Why stl map not support an insert like the following:
std::map<obj1, obj2> map_int
void insert_map(obj1 &key, obj2 &val)
{
map_int.insert(key, val);
}
I know that the above is incorrect. I want to know what prevents from designing the insert function like that. It is more intuitive than creating a pair IMO.
Aucun commentaire:
Enregistrer un commentaire