diff --git a/include/boost/next_prior.hpp b/include/boost/next_prior.hpp index 58da590..bad46ed 100644 --- a/include/boost/next_prior.hpp +++ b/include/boost/next_prior.hpp @@ -22,6 +22,8 @@ #include #include #include +#include +#include namespace boost { @@ -101,7 +103,7 @@ struct next_advance_impl< T, Distance, true > { static T call(T x, Distance n) { - std::advance(x, n); + boost::iterators::advance(x, n); return x; } }; @@ -147,8 +149,8 @@ struct prior_advance_impl< T, Distance, true > static T call(T x, Distance n) { // Avoid negating n to sidestep possible integer overflow - std::reverse_iterator< T > rx(x); - std::advance(rx, n); + boost::iterators::reverse_iterator< T > rx(x); + boost::iterators::advance(rx, n); return rx.base(); } };