Re: [sigc] Range over signals



On Wed, 2005-11-30 at 08:52 +0100, Dick Eimers wrote:
> > People do get obsessed with optimisation, yes. But, anyway, we couldn't
> > change this now, without breaking ABI.
> 
> All very true.
> 
> > I suggest that you 
> > a) Store a second piece of information alongside each signal,
> > identifying the signal type.
> > b) Use static_cast<>, after you've discovered what the type is.
> 
> Since the types provided as template parameters to class template
> sigc::signal#<> is a compile-time notion, this can only work if some
> predefined set of signal instantiations is used and hence not a very
> flexible solution. But hopefully I am wrong.

The same would be true whether you are using your own type
identification system or dynamic_cast<>. I don't see how you can have
compile-time type-safety when choosing the types at runtime, but I'm not
sure what you want to achieve.

-- 
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]