Re: [gtkmm] A const_iterator for TreeModel?
- From: murrayc murrayc com
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] A const_iterator for TreeModel?
- Date: Tue, 17 Feb 2004 10:40:18 -0800 (PST)
> Take a look at Item 26 in Scott Meyer's Effective STL. He says that
> there is an implicit conversion from iterator to const_iterator
> --- but not the other way around!.
Interesting. I had tried that with std::list_iterator and const_iterator,
without success. Could someone else try as well please.
> You have to use the base() method on
> the reverse iterators to get to iterators.
Thanks. I didn't know that. Is that something that people are used to
using, or is it an obscure part of the implementation?
> So, you should be able to write a definitive const_iterator method,
> and then have the other three call the const_iterator method
> with the appropriate implicit or explicit conversion.
If there is _an_ implicit conversion then we should not need the other
method overloads.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]