I was wandering the C++ specifications (cplusplus.com) and found that there's nothing told about exception safety for std::unordered_map
so basically if I write
map["foo"]=5;
and an exception is thrown because I'm out of memory or bad_alloc, what can I assume about my map?
- It is left in a valid state? (basic guarantee)
- It is left unchanged? (strong guarantee)
- It is left in unvalid state ? (no guarantee)