I have read that std::vector erase method use move operations only if type is known to not emit exceptions due to strong exception safety. Other comments are that erase method quarantine basic or no throw exception safety depending on that if element constructor throws or not. I wasn't able to clarify that in my C++11 draft. I did test and it shows basic exception safety quarantine, it also used move constructor which was not marked as noexcept. Did I overlook something ? What is right ?
Aucun commentaire:
Enregistrer un commentaire