simbody/simbody — pull request #69 by scpeters (2013-11-20 09:01:15+00:00)
Title: Fix #66: add += operator to VectorIterator class

The build is broken on Mac OS X 10.9. One big change is the move to libc++ by default, which has caused some problems for other people.

I'm not sure if this is related to libc++ or not, but it seems that the templated std::sort with clang on OS X 10.9 requires iterators to have a += operator defined. Adding the operator fixes the broken build.

@sherm1 can you check the assert math? I tried to extend the logic used in the increment operators, but I'm not sure if it's off by 1.