boostorg/utility — pull request #15 by Lastique (2014-06-23 21:17:15+00:00)
Title: Reworked next() and prior() taking the distance arguments.

The new version should provide the expected behavior in the case (prior(v.end(), v.size()) == v.begin()). It should also work with integers now, as was originally intended by David Abrahams. Added tests to verify these new use cases.

See the relevant discussions:
https://groups.google.com/forum/#!topic/boost-developers-archive/qZtIM6l9B0s
http://lists.boost.org/Archives/boost/2004/02/61556.php