
On Fri, 13 Feb 2004 01:22:10 +0200, "Peter Dimov" <pdimov@mmltd.net> wrote:
He is right, but not because of 5.2.10/8. :-) 5.2.10/5 + footnote 64 say you are home free.
Hmm... I think a committee clarification is in order: 5.2.10/8 mentions "null pointer value", not "null pointer constant". That seems intentional, but then the footnote makes a special case for any integral constant expression (even if lvalue). Furthermore, that's a footnote... I don't see anything in normative text supporting it; and it seems more useful to have static_cast and reinterpret_cast work differently. Note that, if the footnote is correct, to have reinterpret_cast semantics you have to use a non-const intermediary, for instance an int variable: int v = 0; reinterpret_cast<T*>(v); // implementation defined. reinterpret_cast<T*>(0); // null pointer value of type T* const int W = 0; reinterpret_cast<T*>(w); // null pointer value of type T* Nightly yours ;) Genny.