Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users] Cartesian product
From: Christoph Heindl (christoph.heindl_at_[hidden])
Date: 2011-10-26 13:12:48


On Wed, Oct 26, 2011 at 5:34 PM, Larry Evans <cppljevans_at_[hidden]> wrote:
> [...]
> shows how to do this where values in the containers are all same type.
> It works by simply keeping a vector of loop indices or iterators.
> During the operator++, it checks which which iterator to increment,
> and if that is at the end, then it moves to the next iterator.
> Dereferencing all the iterators should give 1 element in the
> cross product.  I would think that simply changing the vector
> of loop indices to a fusion vector of those indices  would enable
> the same to be done containers of different types.

Thanks for the hint.

Actually I have something similar up and running based on code from
stackoverflow. My problem stems from missing meta-programming skills.

For example if we go for boost fusion, then how to get the value_type
of the boost fusion vector corresponding to tuple<....>, etc...

Best regards,
Christoph


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net