Re: Something wrong with ustring::const_iterator



On Tue, 28 Apr 2009 21:19:54 +0100
Chris Vine <chris cvine freeserve co uk> wrote:
> On Tue, 28 Apr 2009 17:58:54 +0200
> Daniel Elstner <daniel kitta googlemail com> wrote:
> > I think it should just work to make the comparison operators
> > non-templated functions that take const_iterator arguments only, and
> > rely on the implicit conversion from iterator to const_iterator.
> 
> Yes, that would work.  But the iterator would have to be passed by
> value (as Glib::ustring::const_iterator) rather than by reference (as
> const Glib::ustring_Iterator<T>&), which may be why you did it the
> second way.

Actually that's not right.  It could be passed by const
Glib::ustring::const_iterator& and still get the implicit conversion,
which would be the best way of doing it.  (Too many consts for my poor
mind).

I've said I will submit a patch so I will do it that way (unless you
want to patch it).

Chris


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]