From: Toon Knapen (toon_at_[hidden])
Date: 2001-08-27 09:41:10
David Abrahams wrote:
> This is a good idea, but it is common to need to select the stride at
Indeed, this was also on my todo list.
> A couple of my colleagues made such a policy and associated generators;
> perhaps you'd like to take a look? If so, I'll see if I can convince them to
> post it.
Would be great !
> An intersting fact about striding over matrices: to avoid undefined behavior
> you usually need to allocate an extra row (or column) so that there's a
> valid end iterator position.
I'm not quite following you here.
But what I think you're referring to (and what I've also been wondering
about) is that strided_iterator can easily jump past the past-the-end
iterator and thus begin undefined. So you need some way to detect this.
One way is to provide the iterator_adaptor also the correct past-the-end
iterator of the container. This would however make the strided_iterator
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk