Boost logo

Boost :

Subject: Re: [boost] Is there any interest in a library which solves C++ class reflection feature just like Java does?
From: Julien Nitard (julien.nitard_at_[hidden])
Date: 2011-12-05 22:07:54


Hi,

>In brief, I'd designed and implemented somehow C++ class reflection based
on boost libraries.

I am interested. Could you detail how it differs from BOOST_*FUSION*_ADAPT_*
STRUCT* in boost::fusion ? It seems very similar to me.

>It has some unique advantages:
>a) it doesn't require code generator

Well ... I'd prefer that a code generater be provided: Your syntax is not
that lightweight, you can compare with boost::reflect that is a non
proposed library (link https://github.com/bytemaster/boost_reflect).
If you want to reflect a large number of classes, then your solution is not
very maintenable (as all solutions without a code generator).

One more thing: your solution is "runtime" reflection, I think in C++ a
compile time API would make more sense, though, I must say there are
advantages for both.

Regards,

Julien


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