From: David Abrahams (dave_at_[hidden])
Date: 2002-11-15 17:08:02
Gennaro Prota <gennaro_prota_at_[hidden]> writes:
> On Fri, 15 Nov 2002 16:05:05 -0500, David Abrahams
> <dave_at_[hidden]> wrote:
>>Douglas Gregor <gregod_at_[hidden]> writes:
>>> 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?
> Who knows? When I encounter these sorts of situations I dream a
> standard where propositions can be demonstrated like in mathematics or
> counter-examples provided. Don't you?
Yeah, but then I start dreaming of programs which can read my
questions in English and produce a mathematical proof for me <wink>.
-- David Abrahams dave_at_[hidden] * http://www.boost-consulting.com Boost support, enhancements, training, and commercial distribution
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk