------- Comment #1 from redi at gcc dot gnu dot org 2010-06-23 14:57 ------- (In reply to comment #0) > The std::bad_alloc definitions should be placed into a > separate file.
IIUC that wouldn't work, <new> is required to declare bad_alloc, so if bad_alloc was moved to a separate file, the parts of the library which need nothrow_t, new_handler and operator new etc. would still have to include <new>, which would still have to include bad_alloc. The way to achieve what you want is to put everything except bad_alloc in a separate file, and include that file instead of <new> when bad_alloc is not needed. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44647