Boost logo

Boost :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-03-12 17:53:12


Max Motovilov wrote:
> David Abrahams wrote:
>> If the original posting there isn't a true crossproduct view, I would be
>> very grateful if you'd replace it with your own solution.
> I think we've settled that the solution to the book problem is a correct
> crossproduct view for 2 sequences. Mine is set up to handle any number
> of sequences from 0 to n but it is certainly bad illustrative material
> as it's much more convoluted.

The two are not the equivalent. Given vector_c<int, 0, 1> and
vector_c<int, 2, 3>
the book solution generates the equivalent of
vector<vector<pair<0, 2>, pair<0, 3> >, vector<pair<1, 2>, pair<1, 3> > >
while your solution flattens the result.

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at