[boost] Re: Re: dangerous_cast<>

2002-12-04 Thread David B. Held
"Gabriel Dos Reis" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [...] > What do mean exactly by a "valid Foo*"? I mean that reinterpret_cast<> may legally map what you think ought to be a Foo* in a T* to a value that does not point to any Foo object. At least

[boost] Re: Re: dangerous_cast<>

2002-12-04 Thread Eric Woodruff
"David Abrahams" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > > > Thanks for your patience. > > > > Now, imagine an implementation where the original type is remembered, > > then dereferencing the pointer obtaine

[boost] Re: Re: dangerous_cast<>

2002-12-07 Thread Eric Woodruff
"Gabriel Dos Reis" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Eric Woodruff" <[EMAIL PROTECTED]> writes: > > [...] > > | > Thus, given that h.storage is properly aligned, (which is the purpose of > | the > | > other union member), after "new(h.storage) Foo

[boost] Re: Re: dangerous_cast<>

2002-12-09 Thread David B. Held
"Beman Dawes" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [...] > Several committee members (Gaby, Dave Abrahams, Greg, me, > etc.) will be happy to post something on that list if the question is > well-formed and is one that only committee members can answer

Re: [boost] Re: Re: dangerous_cast<>

2002-12-04 Thread Gabriel Dos Reis
"David B. Held" <[EMAIL PROTECTED]> writes: | "Gabriel Dos Reis" <[EMAIL PROTECTED]> wrote in message | [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | > [...] | > What do mean exactly by a "valid Foo*"? | | I mean that reinterpret_cast<> may legally map what you think ought | to be a Foo* in a T*

Re: [boost] Re: Re: dangerous_cast<>

2002-12-07 Thread Gabriel Dos Reis
"Eric Woodruff" <[EMAIL PROTECTED]> writes: | "Gabriel Dos Reis" <[EMAIL PROTECTED]> wrote in message | [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... | > "Eric Woodruff" <[EMAIL PROTECTED]> writes: | > | > [...] | > | > | > Thus, given that h.storage is properly aligned, (which is the purpose | of

Re: [boost] Re: Re: dangerous_cast<>

2002-12-09 Thread Gabriel Dos Reis
"David B. Held" <[EMAIL PROTECTED]> writes: [...] | 2) Under what circumstances is the following equivalent to the | above: | | reinterpret_cast(p); One of the issues that distinguishly arose during this disucssion is whether reinterpret_cast(ptr) is well-formed. (My compilers don't reje