Originally Posted by
whiteflags
Ah, well exception's unwind the call stack.
So if you end up throwing an exception, from push_back() it might be caught where push_back() was used. If not there, then in the function that called that function, even if it was an object method. If not in the object method, then the object is destroyed when it has to go further into the call stack... until ultimately, main(). Now, either main() catches the exception or the program terminates badly with what's called an unhandled exception.