Boost logo

Boost :

Subject: [boost] Boost Fusion suggestion
From: Pavel Ba¾ant (pbazant_at_[hidden])
Date: 2012-03-27 15:03:40


I am not actually a Boost developer, but have the following suggestion
regarding boost.fusion:
I find the macro
BOOST_FUSION_DEFINE_STRUCT
potentially very useful, but it does not provide means to influence
the initialization list of the default constructor. Alternatively,
means to emulate c++11 default initialization (the struct Foo {int
x=10;} syntax) could be emulated. Such feature would be very useful,
as it would minimize repetition and make it easier to ensure that
uninitialized variables are nowhere used.

I already generate my structs from BOOST_PP sequences in a similar way
to BOOST_FUSION_DEFINE_STRUCT to avoid having to write json
serialization boilerplate, but a variant of BOOST_FUSION_DEFINE_STRUCT
i am suggesting would make this task even simpler.

Pavel Bazant


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