[9895] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: gtkmm: can't use Signal1

daemon@ATHENA.MIT.EDU (Tero Pulkkinen)
Thu Nov 5 14:12:34 1998

To: gtk-list@redhat.com
From: Tero Pulkkinen <terop@students.cc.tut.fi>
Date: 05 Nov 1998 21:09:47 +0200
In-Reply-To: Todd Dukes's message of "Thu, 05 Nov 1998 11:22:37 -0600"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

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

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post