Frank Mori Hess wrote:
It's to compensate for the fact that it is not called in the constructor, which I originally tried. If it's not called before the first dereference, then you might try to execute an invalid slot. If it's not called before the first increment, then you might not increment past the first slot. I got rid of the call in the constructor because it killed concurrent invocation, due to the iterators still in scope in operator() holding locks to the first slot. However, since I optimized it to only create temporary iterators when passing them to the combiner, I could probably just put the call back into the constructor.
I'd say the combiner must always check for an empty range and the comparison of first and last will always ensure a valid position, or? Regards Timmo Stange