Boost logo

Boost :

From: Douglas Gregor (gregod_at_[hidden])
Date: 2004-02-12 18:02:13

On Thursday 12 February 2004 05:22 pm, Peter Dimov wrote:
> Ralf W. Grosse-Kunstleve wrote:
> > @@ -209,6 +211,7 @@
> > // Clears up a warning with GCC 3.2.3
> > return make_any_pointer(reinterpret_cast<void*>(0));
> This of course doesn't have anything to do with your patch, but it caught
> my eye. reinterpret_casting 0 to void* is not guaranteed to yield a null
> pointer. :-)

Shortly after this message this message hit the Boost list (and before I saw
it), I received this helpful little note from a friend:

        "You might want to arm yourself with 5.2.10/8 and 4.10/1."

He's right, I think. 0 is the null pointer constant, which is a null pointer
value, which is converted to the null pointer value of the destination type.

But if you don't agree, I'm just as happy replacing it with a static_cast
instead of starting a long discussion. It's just not worth it :)


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