Boost logo

Boost :

Subject: Re: [boost] [fusion] getting type of attribute_proxy for BOOST_FUSION_ADAPT_ADT
From: Damien Buhl (damien.buhl_at_[hidden])
Date: 2016-03-05 06:53:33

On 04/03/2016 17:32, Jens Weller wrote:
> [snip]
> Ticket created under:
> Which brings me to another fusion question/improvement:
> ADT structs don't know their member names, which can be fixed with such a construct:
> template <> struct struct_member_name<CLASS, INDEX> { 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 :

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.

Damien Buhl (alias daminetreg)

Boost list run by bdawes at, gregod at, cpdaniel at, john at