|
Boost : |
Subject: Re: [boost] [intrusive] rtti_base class proposition
From: Eugene Wee (crystalrecursion_at_[hidden])
Date: 2009-10-22 02:05:50
Hi,
On Thu, Oct 22, 2009 at 12:08 PM, Ireneusz Szpilewski
<irek_at_[hidden]> wrote:
> What if MyHeart has SingMySong() method while Heart does not?
> How can I access it?
Since we are on the topic of RTTI, you could just use say,
dynamic_cast to convert the Heart* to a MyHeart* and thus call
SingMySong(). On the other hand, maybe Heart should have such a
virtual function instead, if it is supposed to be used
polymorphically.
Regards,
Eugene
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk