Re: [sigc] Overloaded Member Methods as Slots



We ended up looking at the mem_fun source and creating our own
specific classes based on this model for particular return types and
signature types.  I'm a bit new to templates, but to me it seemed to
be an ambiguity due to nested templates.

thanks for the help.
wes

On 3/6/06, Murray Cumming <murrayc murrayc com> wrote:
> On Mon, 2006-03-06 at 09:15 +0100, Ulrich Eckhardt wrote:
> > Wesley Smith wrote:
> > > Basically, if we have a class with with several methods of the same
> > > name but with different arguments, how can we specify which of the
> > > overloaded functions get hooked in in order to disambiguate.
> >
> > Not only for memberfunctions but other functions as well, you need to
> > use a static_cast to the right function pointer type in order to do
> > that.
>
> That's clever. I never thought of that.
>
> >  This has nothing to do with SigC++ but might be worth mentioning
> > in the docs anyway.
>
> Maybe you could provide a patch. However, I don't recommend this
> technique much. In most cases, it's probably a lot more clearer for the
> programmer to just rename the function. Of course, in a minority of
> cases, this might not be possible.
>
> --
> Murray Cumming
> murrayc murrayc com
> www.murrayc.com
> www.openismus.com
>
> _______________________________________________
> libsigc-list mailing list
> libsigc-list gnome org
> http://mail.gnome.org/mailman/listinfo/libsigc-list
>



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