Subject: [Boost-users] fusion struct adapt macro, construct the struct from a fusion vector
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-01-17 09:02:28


Hello,

I have a
struct params {
...
};

and I have adapted it as a fusion sequence.

However I can't construct a params from a boost::fusion::vector<> with the same types.

const params p( v ); // v is a fusion::vector with the same type
const params p = v; // both failed to compile

Do I need to actually write a specific ctor for params?
Will it change the result of the adapt macro?

Can I iterate with an algorithm over the vector at runtime to assign to p from v?
with fusion::for_each() I couldn't write the functor that would let me assign to p.

Regards,