|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-06-27 17:46:48
From: "Joerg Walter" <jhr.walter_at_[hidden]>
> > ) Why do all dynamic allocations via 'new' are followed by 'if (!data_)
> > throw std::bad_alloc'? "new" already throws bad_alloc if memory is
> exausted.
>
> Not under MSVC.
That's surely fixed for vc7 and even more-surely for 7.1 (though I'm not
checking). If you absolutely /must/ do this you should go through a
bottleneck function template for which specializations can be supplied in a
compiled library, to cut down on code bloat in clients.
-Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk