Boost logo

Boost :

From: Max Motovilov (max_at_[hidden])
Date: 2008-03-12 09:22:41

> In that case, then yes, it's been at least considered. The
> _C++ Template Metaprogramming_ book has it as an exercise,
> exercise 7-8 and calls it crossproduct_view.

Note to self: read the book :-). The MPL learning curve is steep and
every little bit should help.

> A solution is posted here:
> It would be interesting to compare the two solutions. The exercise just
> specified 2 input sequences whereas your's allows (I guess)
> any n>0 number of input sequences.

No, they don't look similar. As far as I can tell from a one-minute
look, the solution is simply a nested for_each loop and does not provide
an actual sequence adapter, despite the name cross_product_view. Mine is
a lazy view implemented using a sequence of iterator "digits".


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