diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:30:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:32:57 +0900 |
commit | 71d216b90256936a9638f325af9bc69d720e75de (patch) | |
tree | 9c5f682d341c7c88ad0c8e3d4b262e00b6fb691a /boost/geometry/algorithms/detail/single_geometry.hpp | |
parent | 733b5d5ae2c5d625211e2985ac25728ac3f54883 (diff) | |
download | boost-71d216b90256936a9638f325af9bc69d720e75de.tar.gz boost-71d216b90256936a9638f325af9bc69d720e75de.tar.bz2 boost-71d216b90256936a9638f325af9bc69d720e75de.zip |
Imported Upstream version 1.59.0
Change-Id: I2dde00f4eca71df3eea9d251dcaecde18a6c90a5
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/geometry/algorithms/detail/single_geometry.hpp')
-rw-r--r-- | boost/geometry/algorithms/detail/single_geometry.hpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/boost/geometry/algorithms/detail/single_geometry.hpp b/boost/geometry/algorithms/detail/single_geometry.hpp index f38295ada6..31e4401099 100644 --- a/boost/geometry/algorithms/detail/single_geometry.hpp +++ b/boost/geometry/algorithms/detail/single_geometry.hpp @@ -14,7 +14,10 @@ #ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_SINGLE_GEOMETRY_HPP #define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SINGLE_GEOMETRY_HPP +#include <boost/mpl/if.hpp> #include <boost/type_traits/is_base_of.hpp> + +#include <boost/geometry/core/assert.hpp> #include <boost/geometry/core/tag.hpp> #include <boost/geometry/util/range.hpp> @@ -44,17 +47,12 @@ struct single_geometry template <typename Geometry> struct single_geometry<Geometry, true> { - typedef typename boost::mpl::if_c - < - boost::is_const<Geometry>::value, - typename boost::range_value<Geometry>::type const&, - typename boost::range_value<Geometry>::type - >::type return_type; + typedef typename boost::range_reference<Geometry>::type return_type; template <typename Id> static inline return_type apply(Geometry & g, Id const& id) { - BOOST_ASSERT(id.multi_index >= 0); + BOOST_GEOMETRY_ASSERT(id.multi_index >= 0); typedef typename boost::range_size<Geometry>::type size_type; return range::at(g, static_cast<size_type>(id.multi_index)); } |