Originally Posted by
grumpy
Not true. The STL is designed with defined levels of exception safety in the presence of any exception: for example, if an operation on an element of a container throws an exception, then the container remains in a sensible state (it can be destroyed safely, does not generate memory leaks, etc) and the exception propagates to the caller. There are a few conditions on this (eg destructors of container elements are not allowed to throw exceptions, elements of containers must also keep themselves in a destructible state if an exception is thrown, etc). The net effect is that the STL behaves in a rational manner if any exception is thrown, and does not need to know anything about exceptions which might be thrown.