On 04/03/2016 17:32, Jens Weller wrote:
[snip] Ticket created under: https://svn.boost.org/trac/boost/ticket/12041
Which brings me to another fusion question/improvement: ADT structs don't know their member names, which can be fixed with such a construct: #define ADT_MEMBER_NAME(CLASS, INDEX, MEMBER) \ template <> struct struct_member_name
{ typedef char const *type; static type call() { return #MEMBER; } }; namespace boost { namespace fusion { namespace extension { ADT_MEMBER_NAME(ListEntry, 0, text) ... ADT_MEMBER_NAME(ListEntry, 6, published) } } }
Could that be integrated into the BOOST_FUSION_ADAPT_STRUCT_ADT etc. macros?
thanks,
Jens Weller
Hi Jens, I'm aware of this problem, as well for the name, as for detecting whether a proxy is in use or not. Additionally the proxies objects are suboptimal, they were long wrongly implemented, in that that the Fusion user had to know by adapting an ADT the internal fusion proxy prefix : https://github.com/boostorg/fusion/commit/b5018586aad1475652702a41d4f317f449... Since that point I wanted to bring better support for proxied member, and now you gave me the motivation and the occasion. I'll come up back soon with some fixes for this. Cheers, -- Damien Buhl (alias daminetreg)