Re: [gtk-list] Re: gtkmm: can't use Signal1<const string>



Todd Dukes <tdukes@ibmoto.com> writes:
> > class y : public Gtk_Signal_Base
> > {  Signal1<const string> test;
> >  public:
> >    void function(const string y);
> >    y()
> >    {  connect_to_method(test,this,&function);
> >    }
> > };
> 
> Looks like it might be the compiler. This compiled for me with egcs 1.1.

The problem here seems to be the "const" keywords...

remove both of them and it'll work. (your typedef did do that...)

But I have no idea why it does this...

The C++'s handling of const parameters in templates might be the cause,
(I should probably look at standard how it should work..). This might
be correct behavior though .. :)

-- 
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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