Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-10-22 04:27:55


Hello,
I've just used the iterators_facade class to create a new iterator which takes
a vector or vectors and traverses elements contained in inner vectors.
This was pretty simple, and worked nice, but I have a few questions

1. The only docs I've seen tell that "AccessCategory" parameter should be of
"unsigned" type. Yet in practice one has to pass
boost::writable_lvalue_iterator_tag, which is class. Is something out-of-date
there?

2. I must admit this is the first time I create complete iterator with
iterator_facade, so I'd really appreciate if someone takes a brief look and
tells if there are any blunders. The code is at

    http://zigzag.cs.msu.su:7813/nested_vector_iterator.hpp

3. If the code is OK, may I add it to Boost one day? My primary motivation was
to make vector<vector<T> > model EdgeListGraph concept from BGL, so if I
change vector_as_graph.hpp, this iterator must be added, too. If it's okay,
where can it be added?

4. How const version of the iterator it to be created? Should I create a base
class which defines dereference/advance/equal and derive const/non-const
iterator from that?

TIA,
Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk