Subject: Re: [boost] [fusion] sequence member pointer
From: Daniel Larimer (dlarimer_at_[hidden])
Date: 2011-02-25 00:07:58
On Feb 24, 2011, at 11:09 PM, Joel de Guzman wrote:
> On 2/25/2011 10:44 AM, Daniel Larimer wrote:
>> I am attempting to use a fusion sequence with a visitor pattern that expects 'member function' or 'member data' pointers.
>> What I would like to do is something like:
>> But obviously this cannot work because of how fusion::vector<int,double> is implemented with a single vector_n<...> vec data member that is private.
>> So trying to "reflect" a vector in the same way that I "reflect" a struct does not work.
>> Any good ideas? Is there any reason why this 'implementation detail' needs to be hidden?
> Well, the proper way is to use fusion::for_each(s) and you don't have to
> care what the internal structure of s is. I highly suggest that you use
> the fusion algorithms to walk through (visit) a fusion sequence.
That is what I ended up doing, but it ends up being a special case.
> Joel de Guzman
> 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