From: Joel de Guzman (joel_at_[hidden])
Date: 2008-04-24 14:27:32
Joe Gottman wrote:
> I have a request for a new type of view for the fusion library:
> flat_view. This would operate on sequences that contain other
> sequences, for instance
> tuple<double, tuple<int, long>, pair<double, string> >
> and flatten them by recursively digging into the contained sequences to
> get all of their types. So for the example above, it's size would equal
> 5 and it's returned types would be double, int, long, double, string. I
> don't know how difficult this would be to implement, but I think it
> could be very useful.
Yeah, it is very useful. The tricky part is the segmented iteration.
Eric dealt with this sometime ago. It's very tricky, to say the
If you'll be in Aspen, Dan Marsden's traversal lib: "A New Library
for Working with Hierarchical Data Types" would also be interesting
to look into.
-- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net