Boost logo

Boost :

Subject: Re: [boost] DRYing BOOST_FUSION_ADAPT_STRUCT with decltype/Boost.TypeOf ?
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2013-12-18 16:23:10


> I think it would be valuable to add macros that would enable to select the fields that we want to adapt to a Random Access Sequence without requiring to repeat the type information. I would find more comfortable to write the example provided here http://www.boost.org/doc/libs/1_55_0/libs/fusion/doc/html/fusion/adapted/adapt_struct.html as follow : > > namespace demo > { > struct employee > { > std::string name; > int age; > }; > } > > // demo::employee is now a Fusion sequence > BOOST_FUSION_ADAPT_STRUCT_EXT( > demo::employee, > (name) > (age)) I think that's a good idea. I would file a ticket in Trac to make sure this is not forgotten. Regards, Nate


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk