diff --git a/include/boost/geometry/util/range.hpp b/include/boost/geometry/util/range.hpp index 177fca92c..89d981619 100644 --- a/include/boost/geometry/util/range.hpp +++ b/include/boost/geometry/util/range.hpp @@ -138,7 +138,7 @@ back(BidirectionalRange const& rng) { BOOST_RANGE_CONCEPT_ASSERT(( boost::BidirectionalRangeConcept )); BOOST_ASSERT(!boost::empty(rng)); - return *(--boost::end(rng)); + return *(boost::rbegin(rng)); } /*! @@ -151,7 +151,7 @@ back(BidirectionalRange & rng) { BOOST_RANGE_CONCEPT_ASSERT(( boost::BidirectionalRangeConcept )); BOOST_ASSERT(!boost::empty(rng)); - return *(--boost::end(rng)); + return *(boost::rbegin(rng)); }