Re: [sigc] Range over signals



[snip]
> When altering the main-function it showed that it is possible to return
> a 'sigc::signal<void, int>*' as a 'sigc::signal_base*'. However, it is
> not possible to go the other way around (cast base class pointer to a
> derived class pointer) given that my compiler (g++ 4.0.1)
> chokes and tells me that the 'source type is not polymorphic'. Does
> anyone got any hints?

A dynamic_cast<> should allow this. You'd need lots of them, in an
if/else-if block, for each sigc::signal<> type that you expect.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]