mardi 12 juillet 2016

How do I know if std::map insert succeeded or failed?


I have a map in a multithreaded app mapping a class called uuid to pointer. What I want to know if an insert operation succeeded for failed.

e.g.

_mymap.insert(hint, MyMap::value_type(entry.uuid, itemptr));

Does it throw an exception or something if it fails?


Aucun commentaire:

Enregistrer un commentaire