
19 Jan
2010
19 Jan
'10
2:25 a.m.
I am trying to write code that is as independent of the struct as possible. The first thing that comes to my mind for the ctor is
struct params { ...// there are 7 members, in the 100 or so different structs I will have, max 20 members maybe template
params(const fusion::vector & v); }; This probably isn't what you meant. How to generalize it to any fusion sequence? Is it possible to generalize the number of template args?
What about: template <typename Seq> params(Seq const& seq, typename boost::enable_if< fusion::traits::is_sequence<Seq> >::type* = NULL); ? Regards Hartmut --------------- Meet me at BoostCon www.boostcon.com