Check boost.org, there are techniques to work around this problem by
returning a small proxy-class or something like that.
Warren Young wrote:
> alan.alvarez@stripped wrote:
>
>> Is there a specific reason why subscript_iterator doesn't have a ->
>> operator?
>
>
> From the ChangeLog, v2.0.0:
>
> o Removed arrow operator (->) for iterator returned by Fields,
> Result and Row containers. It was inherently buggy, because
> a correct arrow operator must return the address of an
> object, but the underlying element access functions in these
> classes (e.g. at()) return objects by value, of necessity.
> Therefore, this operator could only return the address of
> a temporary, which cannot be safely dereferenced.
>