Boost logo

Boost Users :

From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2008-01-02 19:24:05


On 02/01/2008, Robert Dailey <rcdailey_at_[hidden]> wrote:
> Where in the standard does it state that assigning an integral constant to a
> pointer type is legal? Perhaps there is some more generic rule in the
> standard to which this concept applies.
>

4.10 Pointer conversions [conv.ptr]
1) A null pointer constant is an integral constant expression (5.19)
rvalue of integer type that evaluates to zero. A null pointer constant
can be converted to a pointer type; the result is the null pointer
value of that type and is distinguishable from every other value of
pointer to object or pointer to function type. Two null pointer values
of the same type shall compare equal.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net