Douglas Gregor <[EMAIL PROTECTED]> writes: > On Friday 15 November 2002 03:36 pm, Gennaro Prota wrote: >> of inventing a separate concept (say "Addressable") for them. The problem I >> see in your resolution is that AFAIK addressof() is not guaranteed to work >> by the standard. Yes, it has an extremely high probability to do the right >> thing, but not a guarantee. > > You'll have to back that up with some standardese. AFAICT, 5.2.10/10 lets > addressof() work: > "That is, a reference cast reinterpret_cast<T&>(x) has the same effect as > the conversion *reinterpret_cast<T*>(&x) with the builtin & and * operators." > > (And that reinterpret casting T* -> U* -> T* preserves the original value).
But you're not doing that. You're doing a reinterpret_cast T& -> U cv&, then taking the address, and reinterpret_casting to T*. Is that really covered by the standard? -- David Abrahams [EMAIL PROTECTED] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost