----- Original Message ----- From: "Joel de Guzman" <joel@boost-consulting.com> To: <boost-users@lists.boost.org> Sent: Wednesday, January 20, 2010 6:09 PM Subject: Re: [Boost-users] fusion struct adapt macro, construct the struct from a fusion vector
Ok, understood. Well, then I suggest that you don't mess with the structs and leave them alone. The goal of FUSION_ADAPT is non-intrusive adaptation. Instead, if you control the assignment to your structs from fusion vectors anyway (which I imagine is the case because as you said, your users do not have to deal with fusion vectors), then I suggest a generic free function assign instead of decorating all your structs:
template<typename Struct, typename Seq> void assign( Struct& v, const Seq& seq ) { ... } The free function is what I went with and it works perfectly fine with my different params structs. Thanks,