Boost logo

Boost Users :

Subject: Re: [Boost-users] [Fusion] How to join more than two sequences
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-09-21 11:50:20


On 9/21/10 4:01 PM, Clinton Mead wrote:
> Hi All
>
> I've noticed the function "join" in the boost fusion library. However,
> it only joins two sequences. Was wondering whether there is (or can be
> easily made) a function that joins any number of sequences.
>
> For example:
>
> new_join(make_vector(1,2,3), make_vector(4,5), make_vector(6)) -> is the
> sequence 1,2,3,4,5,6
>
> AND/OR (pass parameters in a sequence)
>
> new_join(make_vector(make_
> vector(1,2,3), make_vector(4,5), make_vector(6))) -> is the sequence
> 1,2,3,4,5,6
>
> I'd prefer both the first and second versions, but even one version
> would be ok.

join(a, join(b, c))

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net