GNOME Bugzilla – Bug 442284
non-const Gtk::Notebook methods: get_n_pages() page_num()
Last modified: 2007-06-10 09:09:17 UTC
Methods int Gtk::Notebook::get_n_pages() int Gtk::Notebook::page_num(const Widget& child) should be declared "const", as they do not change object state. Other information: This causes the following compilation error when this methods are used on a const declared notebook: error: passing ‘const Gtk::Notebook’ as ‘this’ argument of ‘int Gtk::Notebook::get_n_pages()’ discards qualifiers
OK. We should add const versions of these functions and deprecate the non-const ones. A patch would be welcome. As a workaround for now, a const_cast<> can be used.
Done in svn trunk for gtkmm 2.11/12