2010/12/7, Clinton Mead
Hi All
Lets say I have something like the following:
make_vector(1, make_vector('b', 3, make_vector(4, 5.5), "six"), 7, 8)
I want to produce an function f such that
f(make_vector(1, make_vector('b', 3, make_vector(4, 5.5), "six"), 7, 8)) -> [1,'b',3,4,5.5,"six",7,8]
i.e. a flattened version of the sequence.
Hmmm...not sure if there's already something for that.
Just after seeing your post, I gave it a try to implement it (see attachment),
but there's a problem in this implementation that needs to hack into
Fusion code (not knowing where am I doing wrong). If you want it
compiled, comment away line 39 in
I don't mind if this is a view of the original sequence or an actual vector.
I don't mind a solution in C++0x if it can compile on GCC 4.5.1.
The code attached is written with current standard and the function returns a view. Sorry if this doesn't help, perhaps others would give better solutions.