Re: [gtkmm] A const_iterator for TreeModel?
- From: Robert Zeh <rzeh efs-us com>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] A const_iterator for TreeModel?
- Date: Tue, 17 Feb 2004 16:25:06 -0600
Carl Nygard wrote:
On Tue, 2004-02-17 at 16:21, Robert Zeh wrote:
However, you'll still need to have another function definition for the
reverse_iterator's.
There are some corner cases in converting between reverse iterators and
forward
iterators.
What corner cases? And why wouldn't a template function take care of
it?
Corner cases is the wrong phrase. The base() function returns an iterator
pointing one past the position that the reverse iterator points to. If
you're
doing an insertion that's fine. You'll be inserting things in the right
spot. If you're doing an erase, that's bad, because you won't be erasing
what the reverse iterator points to.
A template function would take care of all the iterator problems, but it
couldn't be virtual.
Robert Zeh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]