Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-12-22 10:45:50

> Hello,
> 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.
> If I'm correct, this could be easily fixed by changing all occurences of
> "p
> = std::malloc(n)" to "p = std::malloc(n ? n : 1)" or something similar.

Ok. Applied.


Boost list run by bdawes at, gregod at, cpdaniel at, john at