
On 2/16/13 5:51 AM, Kozlov Taras wrote:
Started to use Boost.Fusion in my project I quick realized that it would be very convenient if fusion adapt macroses like BOOST_FUSION_DEFINE_STRUCT would give ability to associate additional information with members. Second problem is that BOOST_FUSION_DEFINE_STRUCT and such doesn`t support inheritance.
So I did a small utility library that allow to define fusion sequences with arbitrary list of annotations associated with each member, and want to share it with community :)
http://tarasko.github.com/cppan/
Will appreciate for any comments
Very interesting. I think that the extension to support inheritance is
nice. I would definitely love to see such adapters in Fusion. I'd
love to see both intrusive and non-intrusive adapters though, not just
the intrusive ones. As for the "annotations", well, that's a nice touch,
but I think that's best done by associating members with keys. If you
have a key, MK, for a member of type T, then you can write non-intrusive
traits such as:
traits::has_hash