Boost logo

Boost :

Subject: Re: [boost] [fusion] BOOST_FUSION_ADAPT_TPL_STRUCT
From: Greg Rubino (bibil.thaysose_at_[hidden])
Date: 2014-06-29 18:55:23


Thanks Joel. I'll try that. I was just trying to make it more complicated.
On Jun 29, 2014 3:41 PM, "Joel de Guzman" <djowel_at_[hidden]> wrote:

> On 6/27/14, 11:10 PM, Greg Rubino wrote:
>
>> Hello all,
>>
>> I'm trying to do something like this with fusion:
>>
>> struct exists_tag {};
>>
>> template <typename A>
>> struct unary {
>> type_a m_name;
>> };
>>
>> template <>
>> struct unary<exists_tag> {
>> type_b m_name;
>> };
>>
>> BOOST_FUSION_ADAPT_TPL_STRUCT((A), (unary)(A), (type_a)(m_name));
>> BOOST_FUSION_ADAPT_TPL_STRUCT((), (unary)(exists_tag), (type_b)(m_name));
>>
>> I'm not sure if I'm way off here, or if there is some way to accomplish
>> this that I'm just not seeing.
>>
>
> Why do you need to adapt the specialization? If you adapt the main
> template,
> fusion can pickup all the specializations just fine.
>
> Regards,
> --
> Joel de Guzman
> http://www.ciere.com
> http://boost-spirit.com
> http://www.cycfi.com/
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/
> mailman/listinfo.cgi/boost
>


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