when insert new element to list/map, it returns the iterator pointed to the newly added element.
But if insert failed, what does list/map return? I have read the references, when failed, list/map will not throw a exception.
when insert new element to list/map, it returns the iterator pointed to the newly
Share
If insert cannot allocate the memory,
bad_allocis thrown. In all other cases insert works perfectly. linkUpdate: It also needs to copy the inserted object which can throw any exception.