Boost logo

Boost Users :

Subject: Re: [Boost-users] [Fusion] How to join more than two sequences
From: Clinton Mead (clintonmead_at_[hidden])
Date: 2010-09-21 20:37:50


> join(a, join(b, c))
>
> Regards,
> --
> Joel de Guzman
> http://www.boostpro.com
> http://spirit.sf.net
>
>
How would I write a function that takes a #defineable number of arguments
for this (or alternatively or in addition, uses c++0x variadic
arguments/templates). Could you fill in the gaps?

e.g.

template <class ARG1, ARG2, ...>
? join_args(?ARG1? a1, ?ARG2? a2, ...>
(
   return join(a1, join(a2, join(?)));
);

AND/OR

template <class... ARGS>
? join_args(ARGS&&... args)
{
   ?
};



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