Boost logo

Boost :

From: Max Motovilov (max_at_[hidden])
Date: 2008-03-12 10:56:30


>> 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.

That's the danger of one-minute looks... I take that back. Yes, the
whole thing is a sequence and output pairs are indeed lazily generated.
I am not sure if this approach can be generalized to an arbitrary number
of sequences. Perhaps it can be, by making the whole thing a recursive
template instead of 3 separate ones. I'd try it just to see which
version results in simpler code (gut feeling: the recursive template)
and in faster compilation times (gut feeling: my current implementation)
but customers and management are jointly snapping at my heels...

> So, in view of that, could you explain why it's not a sequence adapter?

The usual explanation: needed more coffee :)

...Max...


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk