Boost logo

Boost :

From: Daniel Frey (daniel.frey_at_[hidden])
Date: 2002-10-07 13:05:20


David Abrahams wrote:
>
> Well, I don't know about your problem domain, but AFAICT, there's
> never an excuse for reinterpret_cast<>. Its effects are
> implementation-defined, whereas the behavior of static_cast<> is
> always defined. As for creating temporary objects, if you're
> static_cast-ing pointers, it can only create temporary pointers. I'm
> sure that's not a problem for you, is it?

My experiments with static_cast for the given problem ended in an
infinite loop if I used it directly. And if going through a void*, this
is no safer than a reinterpret_cast, so I just don't get the point in
using a static_cast. Anyway, I don't have the code here, I'll look at it
when I'm at home and check some things...

Regards, Daniel

--
Daniel Frey
aixigo AG - financial training, research and technology
Schloß-Rahe-Straße 15, 52072 Aachen, Germany
fon: +49 (0)241 936737-42, fax: +49 (0)241 936737-99
eMail: daniel.frey_at_[hidden], web: http://www.aixigo.de

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk