Peter wrote:
I never used reinterpret_cast -- probably because I don't know what it
means.
Can somebody enlighten me?
I looked into Stroustrup's "The annoted C++ reference manual" -- but
this was no help.
Get a newer book. ARM is good, but Acc'd C++ or TC++PL are probably
more up to date on many things...
'reinterpret_cast' is used to convert pointers to objects to integral
values (and back), if there is a type that can hold the entire value;
between pointers of different functions; between pointers and references
of unrelated object types.
Can I assume that reinterpret_cast is not safe and should not be used?
No. It should be used when the requirements call for it.
Does it always succeed even if the cast is garbage?
No.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask