Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-04-01 23:43:51

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;

         (int, x)
         (int, y)

or, if you want fusion to declare the struct itself:

         (int, x)
         (int, y)


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at