From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-24 10:07:49
----- Original Message -----
From: "Toon Knapen" <toon.knapen_at_[hidden]>
> I frequently need to have access to entries in a sequence in a different
> order, depending on the context, as the order in which they are stored.
> For this purpose I use a customised iterator_adaptor which takes as
> input a random-access iterator to the sequence and an iterator that
> specifies the order by which I will access them.
> It's different from the permutation iterator (mentioned in the OOPSLA
> article, not in boost though AFAIK ;-( that the relative order can
> change and even the same entry can appear multiple times.
That's really cool, but I'm not sure I grok the difference in functionality
you achieve from an ordinary permutation iterator. In the ordinary case, the
Base iterator iterates over the permutation offsets, and the policies class
just holds an iterator to the start of the target sequence. It seems to me
that you can change the values of the permutation offsets as you iterate in
that case (and -- why not? -- use duplicate permutation entries) as well.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk