Boost logo

Boost :

Subject: Re: [boost] [UTF String] UTF String library 1.5 ready for perusal
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-02-11 16:12:45

On Fri, 11 Feb 2011 20:21:07 +0100
Thomas Klimpel <Thomas.Klimpel_at_[hidden]> wrote:

> Chad Nelson wrote:
>>> I'm not a fan of returning a reference in operator* as well.
>> No choice in that, I ran into at least one STL algorithm under GCC
>> that wouldn't compile if it wasn't a reference, even when it was
>> only being read. I don't remember which one, but it was something
>> important and commonly-used enough that breaking it was not an
>> option.
> To satisfy the requirements of a forward iterator, you must return a
> reference in operator*. [...] The take-away for this discussion is
> that forward iterator and any of its refinements like bidirectional
> iterator and random access iterator have to return a reference in
> operator*.

That would certainly explain the behavior I saw. Thanks for the

Chad Nelson
Oak Circle Software, Inc.

Boost list run by bdawes at, gregod at, cpdaniel at, john at