Re: Glib::RefPtr + const cast
- From: Murray Cumming <murrayc murrayc com>
- To: skg fluent co in
- Cc: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Glib::RefPtr + const cast
- Date: Thu, 07 Apr 2005 10:30:37 +0200
On Wed, 2005-02-09 at 20:24 +0530, Surya Kiran Gullapalli wrote:
> Hi,
> I'm trying this,
> I've a variable of this type
> Glib::RefPtr<const Gtk::ListStore> list_store_c,
> how can i remove the constness of the variable,
> I'm trying a crude way of doing this....
>
> Gtk::ListStore* list_store =
> const_cast<Gtk::ListStore*>(list_store_c.operator->()) ;
>
> I dont know if there are any problems in doing this, and are there any
> elegent ways of doing this.
> I've looked at Glib::RefPtr documentation, it has only 2 functions on
> casting, cast_dynamic and cast_static,
I have added cast_const() in the HEAD branch of glibmm. Sorry for the
delay, but you did not provide a patch.
Obviously you should never need to use this, so do file bugs against the
gtkmm API if you find that you need it.
--
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]