Raider wrote:
Operator new() must throw std::bad_alloc in no more dynamical memory
left, but what standard says about stack?
Is there a some way to handle stack overflow?
The Standard says nothing about stacks (except of course for
std::stack, but I digress). If your platform does something about stack
overflows, it is implementation-dependent. <OT>I think Microsoft
platforms might throw a "structured exception", which you can handle
with a catch(...) or their __try/__except/__finally keywords. (See
http://www.boost.org/more/error_handling.html for some discussion and
helpful hints on structured exceptions interacting with standard
C++.)</OT>
Cheers! --M