[gtkmm] A const_iterator for TreeModel?
- From: Murray Cumming <murrayc murrayc com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: [gtkmm] A const_iterator for TreeModel?
- Date: Mon, 16 Feb 2004 17:31:40 +0100
I was half-way through implementing the const_iterator,
reverse_iterator, and const_reverse_iterator for TreeModel:
Then I released that, even with a std::list, you can't do
std::list::const_iterator iter_const = iter_non_const;
either explicitly or implicitly.
But you would want to use them in almost all the same places, so any
do_something(const iterator& iter);
method would need
do_something(const const_iterator& iter);
do_something(const reverse_iterator& iter);
do_something(const const_reverse_iterator& iter);
And that would get ridiculous quite quickly, and really problematic when
dealing with virtual methods that should be overridden. Am I
misunderstanding something? I can't think of a good example in the
standard C++ library - things like std::find are templates.
murrayc murrayc com
] [Thread Prev