Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-04-25 08:25:15

"Darin Adler" <darin_at_[hidden]> wrote in message
> On Wednesday, April 24, 2002, at 03:06 PM, Fernando Cacciola wrote:
> > I know as a fact that at least some version of the Borland compiler
> > (don't
> > remember which one), didn't get the fixup right without RTTI if 'base'
> > was
> > not a root type and the inheritance wasn't strictly simple.
> > Maybe this was just a compiler bug, but I've always been under the
> > impression that static casts were *guaranteed* to yield the correct
> > value
> > only when downcasting to a root type or without multiple and virtual
> > inheritance.
> But there's no static cast involved here, is there? This is just a
> conversion without a cast.
True, but what is the semantic of an implicit conversion?
In particular, if under a given circumstance, a static_cast<> yields the
wrong value, how could a conversion without a cast do it right? If the
compiler knows how to do it right for the implicit conversion (or for any
other conversion/cast without RTTI), then it would
certainly do it right for the static_cast<> too, wouldn't it?

Fernando Cacciola
Sierra s.r.l.

Boost list run by bdawes at, gregod at, cpdaniel at, john at