From: Daniel Frey (d.frey_at_[hidden])
Date: 2005-12-23 03:24:20
Markus Schöpflin wrote:
> boost.test currently contains an assortment of new operators which IMO are
> not conforming to the C++ std.
> The implementation basically looks like this:
> p = std::malloc(n);
> if (!p) throw std::bad_alloc();
> This ignores the fact the std::malloc() is allowed to return either 0 or
> some unique pointer on zero sized requests, whereas a C++ allocation
> function _must_ return a unique pointer for each zero sized request.
I think it is guaranteed that a C++ allocation request (operator new) is
never asked to allocate 0 bytes, thus the problem doesn't exist.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk