Re: [sigc] Range over signals
- From: Dick Eimers <d eimers marin nl>
- To: libsigc-list gnome org
- Subject: Re: [sigc] Range over signals
- Date: Tue, 29 Nov 2005 14:56:52 +0100
> 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.
It turns out that the dynamic_cast fails because sigc::signal_base has
no virtual functions (not even a virtual destructor). And, of course,
at least one virtual function needs to be defined in a class to be able
to use the dynamic_cast<> cast.
The reason is probably to optimize for speed, but is it really that
important and more important than being extensible and allow for
type-safe downcasting?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]