|
Boost : |
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2002-12-04 14:28:32
Terje Slettebø <tslettebo_at_[hidden]> writes:
| >From: "Gabriel Dos Reis" <gdr_at_[hidden]>
|
| > Terje Slettebø <tslettebo_at_[hidden]> writes:
| >
| > | >From: "Terje Slettebø" <tslettebo_at_[hidden]>
| > |
| > | > >From: "David Abrahams" <dave_at_[hidden]>
| > | >
| > | > > Gabriel Dos Reis <gdr_at_[hidden]> writes:
| > | > >
| > | > > > Is it any different from reinterpret_cast<T*>(p) ?
| > | > >
| > | > > It might be, depending on your compiler. The behavior of
| > | > > reinterpret_cast<T*> is implementation-defined.
| > | >
| > | > Doesn't that mean that dangerous_cast would also be
| > | implementation-defined?
| > |
| > | Oops, never mind. I thought you meant that the behaviour of
| dangerous_cast
| > | would depend on the compiler, but I understand now that you meant
| > | reinterpret_cast.
| >
| > But, Dave said "it might be, depending on your compiler" which means
| > it might -not-, as well, depending on the compiler.
|
| Yes, as I understand, he said that dangerous_cast may or may not behave
| differently from reinterpret_cast, meaning that the behaviour of
| reinterpret_cast is implementation-defined, while the behaviour of
| dangerous_cast is not.
^^
s/is/might/
| > so, you had a point :-)
|
| I did? :) Could you explain?
There is no guanrantee that dangerous_cast<> has well-defined,
non implementation-defined, behaviour.
-- Gaby
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk