Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-04-25 08:37:21


From: "Fernando Cacciola" <fcacciola_at_[hidden]>
> 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?

How could the implicit conversion yield the wrong value? C++ would be
unusable. static_cast can yield the wrong value only when downcasting, but
this is an upcast, the pinnacle of IS-A etc.


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