
17 May
2009
17 May
'09
2:03 a.m.
How is failure to allocate an exception object handled in various compilers? 15.1.4 says that "the memory for the temporary copy of the exception being thrown is allocated in an unspecified way" but I don't think it specifies behavior for the case when the allocation fails. I know that some compilers allocate exceptions from the heap, so does this mean that an attempt to throw any exception could, in theory, result in a std::bad_alloc being thrown instead? As far as I can tell such behavior wouldn't violate the C++ standard, but I'm not sure my interpretation is correct. Anyone? Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode