
On 20/12/2012 20:34, Dave Abrahams wrote:
Yes; there's a runtime test.
Let's put a runtime test at every step of our critical loop, sounds like a good idea. I actually somewhat looked into this, and in this case segmented iterators don't allow any optimization compared to normal iterators. Also, since this clearly cannot work with heterogeneous scalar/simd sequences, the iterator would need to fill the remaining data with dummy values to fill vectors on the boundaries, dummy value which must change according to what the user needs. Polymorphic algorithms ended up being a significantly more interesting approach.
I'm afraid you have not been specific enough about the problem you claim to see for me to be able to evaluate whether it exists or not.
I'm afraid you're the one trying to make everything fit into this model you've somehow taken a liking to. If you'd like to claim that it can apply, then feel free to show how.