Boost logo

Boost :

From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-03-06 15:51:03


Hi,

I'm interesteed in a non preprocesor solution to the following
transformation which bind N args in a mpl sequence (vector) to a
boost:parameter:paramers signature.

// bind to the signature the Args provided
// template <typename Signature, typename... Args>
// struct args;
template <typename Signature, typename Args>
struct args;
template <typename Signature, typename Arg0>
struct args<Signature, mpl::vector<Arg0> > {
typedef typename Signature::template bind<Arg0>::type type;
};
template <typename Signature, typename Arg0, typename Arg1>
struct args<Signature, mpl::vector<Arg0, Arg1> > {
typedef typename Signature::template bind<Arg0, Arg1>::type type;
};*
...
template <typename Signature, typename Arg0, typename Arg1, ..., typename
ArgN>
struct args<Signature, mpl::vector<Arg0, Arg1, ..., ArgN> > {
typedef typename Signature::template bind<Arg0, Arg1, ..., ArgN>::type type;

I supose that the C+0x variadic templates should allow a more compact
definition.

I would be interested in a non preprocesor solution to this transformation
using boost. Is this possible? Can you help me?

Thanks in advavance.
_____________________
Vicente Juan Botet Escriba


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