Subject: Re: [boost] [fusion] sequence member pointer
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-02-24 23:09:41
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.
-- Joel de Guzman http://www.boostpro.com http://boost-spirit.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk