From: "Gabriel Dos Reis" <[EMAIL PROTECTED]> > David Abrahams <[EMAIL PROTECTED]> writes: > > | Gabriel Dos Reis <[EMAIL PROTECTED]> writes: > | > | > Hmm, I have a couple of questions answers to which will help me > | > get your point. > | > > | > 1) Why can't you do that with reinterpret_cast? > | > | You can, but the results are non-portable > > No more non-portable than with dangerous_cast<>.
I think that Dave's point is that in new(h.storage) Foo; there is a char* -> void* implicit conversion as placement new takes a void*. So the placement new performs char* -> void* -> Foo* (by constructing a Foo at (void*)h.storage), which - in theory - might not be the same as char* -> Foo*. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost