Boost logo

Boost :

Subject: Re: [boost] [fusion] getting type of attribute_proxy for BOOST_FUSION_ADAPT_ADT
From: Joel de Guzman (djowel_at_[hidden])
Date: 2016-03-03 16:53:46


On 03/03/2016 6:16 PM, Jens Weller wrote:
>> Gesendet: Donnerstag, 03. März 2016 um 03:12 Uhr
>> Von: "Joel de Guzman" <djowel_at_[hidden]>
>> An: boost_at_[hidden]
>> Betreff: Re: [boost] [fusion] getting type of attribute_proxy for BOOST_FUSION_ADAPT_ADT
>>
[snip]
>>
>> Hi Jens,
>>
>> Try attribute_proxy::type. It's documented here:
>> http://www.boost.org/doc/libs/1_50_0/libs/fusion/doc/html/fusion/notes.html#fusion.notes.adt_attribute_proxy
>
> Hi Joel,
>
> great!
>
> Is there a generic way to detect which sort of Adapted struct it is?
> typename fusion::result_of::at_c<Seq, I>::type::type t;
> Will probably only work for proxies, which would be fine for my code.

Hmmm, well adt_attribute_proxy only happens, erm with proxies. So I guess the
more relevant question is, how do you easily detect if at_c or any iterator
function returns a proxy(?). Alas, there's no easy way at the moment. It's
easy to add one and perhaps that might be a good idea. Please file a ticket
and I'll see what I can do.

Regards,

-- 
Joel de Guzman
http://www.ciere.com
http://boost-spirit.com
http://www.cycfi.com/

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