Boost logo

Boost :

Subject: Re: [boost] [iterator] counting_iterator and reverse iterator problem (was: [graph][iterators] csr graph and reverse iterator problem)
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-09-08 14:31:10

On Thu, 8 Sep 2011, Takatoshi Kondo wrote:

> Hi,
> On Thu, 8 Sep 2011 07:48:01 +0900
> Michel Morin <mimomorin_at_[hidden]> wrote:
>> Relevant ticket (#2640):
>> Legal forward iterators cannot store their referents
>> (was: counting_iterator::reference lifetime tied to iterator)
> Thanks, I've understood what is the problem.
> I think that when we write a generic algrithm using reverse_iterator
> or make own iterator using counting_iterator, we should refer to this
> problem in comment.
> Anyway my problem has solved. Thanks again :)

One further note -- there is nothing in the BGL requirements that states
that vertex_iterators need to be bidirectional, so you cannot rely on that
being true for arbitrary graph types (see

-- Jeremiah Willcock

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