Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22171

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

$
0
0

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?


Viewing all articles
Browse latest Browse all 22171


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>