Re: Something wrong with ustring::const_iterator
- From: Chris Vine <chris cvine freeserve co uk>
- To: Daniel Elstner <daniel kitta googlemail com>
- Cc: Hubert Figuiere <hub figuiere net>, gtkmm-list gnome org
- Subject: Re: Something wrong with ustring::const_iterator
- Date: Tue, 28 Apr 2009 21:19:54 +0100
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.
Does passing by value have any efficiency implications? If so, it would
be better to provide a templated version of the comparison operators
which is separately typed on both arguments.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]