diff --git a/include/boost/geometry/arithmetic/arithmetic.hpp b/include/boost/geometry/arithmetic/arithmetic.hpp index fa4fb3203..fbc3ca443 100644 --- a/include/boost/geometry/arithmetic/arithmetic.hpp +++ b/include/boost/geometry/arithmetic/arithmetic.hpp @@ -33,53 +33,53 @@ namespace detail { -template +template struct param { typedef typename boost::call_traits < - typename coordinate_type

::type + typename coordinate_type::type >::param_type type; }; -template class Function> +template class Function> struct value_operation { - C m_value; + Value m_value; - inline value_operation(C const &value) + inline value_operation(Value const &value) : m_value(value) {} - template - inline void apply(PointDst& dest_point) const + template + inline void apply(PointDst& point_dst) const { - set(dest_point, + set(point_dst, Function < typename geometry::select_most_precise < - C, + Value, typename geometry::coordinate_type::type >::type - >()(get(dest_point), m_value)); + >()(get(point_dst), m_value)); } }; template class Function> struct point_operation { - PointSrc const& m_source_point; + PointSrc const& m_point_src; inline point_operation(PointSrc const& point) - : m_source_point(point) + : m_point_src(point) {} - template - inline void apply(PointDst& dest_point) const + template + inline void apply(PointDst& point_dst) const { - set(dest_point, + set(point_dst, Function < typename geometry::select_most_precise @@ -87,40 +87,40 @@ struct point_operation typename geometry::coordinate_type::type, typename geometry::coordinate_type::type >::type - >()(get(dest_point), get(m_source_point))); + >()(get(point_dst), get(m_point_src))); } }; -template +template struct value_assignment { - C m_value; + Value m_value; - inline value_assignment(C const &value) + inline value_assignment(Value const &value) : m_value(value) {} - template - inline void apply(P& point) const + template + inline void apply(PointDst& point_dst) const { - set(point, m_value); + set(point_dst, m_value); } }; template struct point_assignment { - PointSrc const& m_source_point; + PointSrc const& m_point_src; inline point_assignment(PointSrc const& point) - : m_source_point(point) + : m_point_src(point) {} - template - inline void apply(PointDst& dest_point) const + template + inline void apply(PointDst& point_dst) const { - set(dest_point, get(m_source_point)); + set(point_dst, get(m_point_src)); } }; @@ -141,7 +141,12 @@ inline void add_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::plus>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::plus + >(value)); } /*! @@ -176,7 +181,12 @@ inline void subtract_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::minus>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::minus + >(value)); } /*! @@ -211,7 +221,12 @@ inline void multiply_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::multiplies>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::multiplies + >(value)); } /*! @@ -247,7 +262,12 @@ inline void divide_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_operation::type, std::divides>(value)); + for_each_coordinate(p, + detail::value_operation + < + typename coordinate_type::type, + std::divides + >(value)); } /*! @@ -282,7 +302,11 @@ inline void assign_value(Point& p, typename detail::param::type value) { BOOST_CONCEPT_ASSERT( (concept::Point) ); - for_each_coordinate(p, detail::value_assignment::type>(value)); + for_each_coordinate(p, + detail::value_assignment + < + typename coordinate_type::type + >(value)); } /*!