Skip to content

the `operator-` of PrZip iterators doesn't reflect how many `++` lie between them.

It appears (demonstrator) that STL algorithms do not always check the end conditions of their underlying loops by calling iterator != range.end(). Instead they take the difference end() - begin() and use that for looping. For the current iterators of PrZip, the number if increments necessary to get from begin to end (iter = begin(); iter++; iter++; iter++; iter == end()) is not equal to the difference reported by end()-begin(). the difference actually reports the offset at which the end() iterator is, but the ++ operator increments the offset by one SIMD width (e.g. 4). This can lead to cases where std::all_of runs outside of the allocated storage (runs four times further than it has to).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information