|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-03-04 08:45:39
David Turner wrote:
>
>> Why is cast<> using a what looks like a homebrew RTTI system?
>> Is there something that makes
>> dynamic_pointer_cast<T::element_type>(w) inappropriate?
>
> Mm, er, um, ah... Yes, it is a homebrew RTTI system. It does nothing
> that could not be achieved with dynamic_cast, but it's a bit less
> weighty. By the way, the widget types already have names (the static
> type() members) anyway, as a consequence of the use of window_base as
> a factory. More on that below.
I think that the important question here isn't "why doesn't cast<> use
dynamic_cast<>", but "am I guaranteed to be able to use
dynamic_pointer_cast<window::element_type>(w) to obtain a window given a
widget w?"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk