From d7aae45dafd2bf627ab00a4a782115c6059b1e3c Mon Sep 17 00:00:00 2001 From: Samuel Debionne Date: Fri, 6 Mar 2015 18:12:56 +0100 Subject: [PATCH] [util][range] Use range_reference Use range_reference to determine the return type of boost::at, boost::front and boost::back. --- include/boost/geometry/util/range.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/boost/geometry/util/range.hpp b/include/boost/geometry/util/range.hpp index 89d981619..cf6941341 100644 --- a/include/boost/geometry/util/range.hpp +++ b/include/boost/geometry/util/range.hpp @@ -81,7 +81,7 @@ pos(RandomAccessRange & rng, \ingroup utility */ template -inline typename boost::range_value::type const& +inline typename boost::range_reference::type at(RandomAccessRange const& rng, typename boost::range_size::type i) { @@ -94,7 +94,7 @@ at(RandomAccessRange const& rng, \ingroup utility */ template -inline typename boost::range_value::type & +inline typename boost::range_reference::type at(RandomAccessRange & rng, typename boost::range_size::type i) { @@ -107,7 +107,7 @@ at(RandomAccessRange & rng, \ingroup utility */ template -inline typename boost::range_value::type const& +inline typename boost::range_reference::type front(Range const& rng) { BOOST_ASSERT(!boost::empty(rng)); @@ -119,7 +119,7 @@ front(Range const& rng) \ingroup utility */ template -inline typename boost::range_value::type & +inline typename boost::range_reference::type front(Range & rng) { BOOST_ASSERT(!boost::empty(rng)); @@ -133,7 +133,7 @@ front(Range & rng) \ingroup utility */ template -inline typename boost::range_value::type const& +inline typename boost::range_reference::type back(BidirectionalRange const& rng) { BOOST_RANGE_CONCEPT_ASSERT(( boost::BidirectionalRangeConcept )); @@ -146,10 +146,10 @@ back(BidirectionalRange const& rng) \ingroup utility */ template -inline typename boost::range_value::type & +inline typename boost::range_reference::type back(BidirectionalRange & rng) { - BOOST_RANGE_CONCEPT_ASSERT(( boost::BidirectionalRangeConcept )); + BOOST_RANGE_CONCEPT_ASSERT((boost::BidirectionalRangeConcept)); BOOST_ASSERT(!boost::empty(rng)); return *(boost::rbegin(rng)); }