Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-01-11 10:01:36


A recent thread in c.l.c++.m:

http://groups-beta.google.com/group/comp.lang.c++.moderated/browse_frm/thread/554e027dfa11fb99/e56b68c2d2d91ecd#e56b68c2d2d91ecd

illustrates the general problem of flattening a tree-like structure
to iterate over the leaves. Could iterable ranges be extended to
do this sort of thing. I'm thinking that if the depth of the
tree, D, were known in advance, then a tuple of iterator ranges
could be used. i.e. for tuple, t, t.get<0> is a range
over leaves of the tree, and t.get<1> is a range over the
next level branch in the tree, until t.get<D-1> is the
iterator over the branches in the root of the tree.
I've currently a need for this; hence, I would be interested
in knowing if there any plans for extending rangelib in
this direction.


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