|
Boost : |
From: David B. Held (dheld_at_[hidden])
Date: 2002-12-09 17:46:38
"Beman Dawes" <bdawes_at_[hidden]> wrote in message
news:4.3.2.7.2.20021209164950.02245168_at_mailhost.esva.net...
> [...]
> 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.
> [...]
I suppose: "What are static_cast<> and reinterpret_cast<> *really*
supposed to do??" isn't sufficiently well-formed? ;)
How about this:
1) Under what circumstances does the following produce defined
behavior:
static_cast<T*>(static_cast<void*>(p));
A) Any time p's value points to an actual T, or is null, or T = void
B) Only when p is of type char* and points to an actual T, or is null,
or T = void
C) Never
D) Other
2) Under what circumstances is the following equivalent to the
above:
reinterpret_cast<T*>(p);
A) Always
B) Implementation-defined
C) Never
D) Other
Is that a reasonable statement of the problem?
Dave
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk