[rangelib]RFE: iterable range tuple to flatten tree?

A recent thread in c.l.c++.m: http://groups-beta.google.com/group/comp.lang.c++.moderated/browse_frm/threa... 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.

On 01/11/2005 08:01 AM, Larry Evans wrote:
A recent thread in c.l.c++.m:
http://groups-beta.google.com/group/comp.lang.c++.moderated/browse_frm/threa...
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 [snip]
I think the gzipped tar file in: http://boost-sandbox.sourceforge.net/vault/flatten_iterator.tar.gz may solve the problem. Any interest?
participants (1)
-
Larry Evans