If I use reserve () to reserve enough elements for a vector, does push_back () (or insert ()) throw any exceptions?
There is no need to redistribute, so the vector itself will not throw any exceptions. The elements you paste can throw exceptions when copying to a vector, so push_backthey insertcan still throw exceptions.
Is there a link somewhere that indicates which stl function throws / throws any exceptions?
Yes, the C ++ standard contains this information.
source
share