Boost logo

Boost :

From: João Abecasis (jpabecasis_at_[hidden])
Date: 2006-05-07 15:19:59


Tobias Schwinger wrote:
> 2. I'm also missing a fusion-equivalent to mpl::unpack_args (that would be about the inverse of 1).

Actually there already is a fusion::unpack_args, alas it is
undocumented. I was the one who implemented this feature and should have
written the docs for it. My apologies to Joel and Dan and to the
reviewers and users of the library.

Anyway, you can find this in

     boost/fusion/sequence/utility/unpack_args.hpp

and use it thusly,

     boost::fusion::unpack_args(f, seq);

where f is a functor or function pointer and seq is a fusion Sequence.
Either argument may be const qualified.

The effect is that of invoking f with each element of seq as an argument.

HTH,

João


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk