On 1/20/2010 2:05 AM, Hicham Mouline wrote:
Following my previous attempt, replacing the functor applied by foreach to the zipped sequence by:
struct assignelt {
template <typename T> void operator()( const vector2
& seqpairs ) const { typedef vector2 pair_t; const_cast (at_c<0, const pair_t>(seqpairs)) = at_c<1, const pair_t>(seqpairs); } }; works. I can now construct my struct params from an equivalent fusion sequence. This constructor is identical for all my params struct. I have structs params1 to params100
Is there a way to factorise this ctor and not repeat its definition in the 100 struct params? Is this possible with a base struct templated on the derived struct?
Wow. 100! Anyway, I've seem to lost context already. Pardon me, I'm not following this thread well. Could you rephrase the problem again in simpler terms? Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon