Re: gtkmm and C++0x



On Tue, 30 Mar 2010 16:19:44 +0200
Murray Cumming <murrayc openismus com> wrote:
> It would be nice if someone played with using these new features in
> gtkmm. For intsance, create a git branch and try to replace use of
> Glib::RefPtr<Thing> with auto wherever possible.

You shouldn't need to change anything. Glib::RefPtr is only used by
gtkmm as far as I am aware in return values and as function arguments.
You should be able to use the auto keyword now with any gtkmm function
returning a RefPtr, with gcc-4.3 and greater with the -std=gnu++0x flag
for the compiler. (Note I said "should" - I haven't tried it.)

The auto keyword doesn't obviate the need to specify the function
prototype: that is necessary for type inference to work.

Chris


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