26 Jul
2007
26 Jul
'07
3:10 p.m.
Jeff Flinn wrote:
Graham Reitz wrote:
I've also used tie to get the best of both worlds:
Yep. The disadvantage though is the one-reference-per-member that tie gives you. This is not quite optimal. With ties, you pass the whole structure with references around, instead of a single reference to the struct. With fusion, you can use the BOOST_FUSION_ADAPT_STRUCT macro I mentioned to make any struct a full fledged fusion container. Then you can pass the struct directly to any fusion algorithm, etc. This is how fusion adapts std::pair now. Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net