mercredi 14 juillet 2021

How can I use value_type from std::unordered_map(and probably other containers)

I'm writing lambda to operate on std::unordered_map values

unordered_map<int, string> map;
auto lambda = [](pair<int, string> value) {/**/};

Is it a way to somehow use value_type instead of writing pair<int, string>?

And in general how value_type could be used?

Aucun commentaire:

Enregistrer un commentaire