
Hi Y'all, As part of Spirit2 dev, I needed to adapt arbitrary structs non-intrusively to fusion. And, I need it to be as simple as possible. How can it be more simpler? Well, I used the std::pair adapter as a test bed. Attached is what's left of the std::pair<-->fusion adapter. Committed to CVS HEAD. Next stop, I'll add some macros to make it easier to adapt simple structs. Example: struct point { int x; int y; }; BOOST_FUSION_ADAPT_STRUCT( point, (int, x) (int, y) ); or, if you want fusion to declare the struct itself: BOOST_FUSION_STRUCT( point, (int, x) (int, y) ); Regards, -- Joel de Guzman http://www.boost-consulting.com http://spirit.sf.net