Boost logo

Boost Users :

From: Nat Goodspeed (nat_at_[hidden])
Date: 2008-05-20 17:28:29


Hansi wrote:

> I have a data struct which has several fields. Now I need to expose this
> fields as name/value pairs (the best would be if the value is a ref
> parameter). Okay I can write this things by hand.
> But is there some solution available to automate this? e.g. some
> metaprogramming with which I can solve this problem? Has anyone an idea?

Perhaps BOOST_FUSION_ADAPT_STRUCT?
http://www.boost.org/doc/libs/1_35_0/libs/fusion/doc/html/fusion/adapted/adapt_struct.html


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net