TITLE: can't use STL in commercial applications (Newsgroups: comp.std.c++, 23 Sep 96) PROBLEM: J. Kanze BUT the real problem comes from the fact, that STL doesn't HANDLE exceptions in any way. That simply means every STL object is undefined after an exception if even if the exception comes from the elements of the container. So vector is something that may result in undefined behavior. I can't event destroy the vector or free its memory. RESPONSE: Willy Wood If a library does not handle an exception and NEEDS to, then it quite simply contains a bug ! Post a concrete example if you have one. RESPONSE: kanze@gabi-soft.fr (J. Kanze) Let's try vector< string >: vector< string > vs( 100 , string( "Some text" ) ) ; Now think of what happens if memory runs out on the 50th copy of string, and operator new throws bad_alloc. The HP implementation of vector simply ignores the exception, and at present, there is nothing in the standard that says what it should do. Of course, ignoring the exception means that the 49 strings already constructed will not be destructed, so you have a monsterous memory leak (in a system where, apparently, memory is tight). There is also no way for the user to avoid this problem.