From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2001-11-24 11:43:35
David Abrahams wrote:
> So, I conclude that there's no difference in capability between the two
> implementations, since the straightforward permutation_iterator doesn't
> detect duplicates and force a failure.
to which implementation are you comparing it to ? As I said in my first
mail, you talk about a permutation adaptor in you OOPSLA paper but
AFAICT it's not in boost : that's why I wrote my own.
> It seems that your implementation makes some interesting trade-offs w.r.t.
> you get value_type (etc.) deduction for free, whereas you don't in the other
> case because the Base iterator actually iterates over the permutation rather
> than the sequence elements
> You only have to dereference one iterator to access an element.
> You modify two underlying iterators whenever the adapted iterator changes
> You dereference on eiterator whenever the adapted iterator changes position
> It is harder for you to assert that two iterators being compared actually
> refer to the same sequence.
that's hard indeed.
What's also not intuitive I guess is that specifying the past-the-end
iterator. It is based on the second argument (the order) instead of the
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk