From f0a80869123739f4c59526cb173bf5926430a06a Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Mon, 13 Oct 2014 12:16:07 +0300 Subject: [PATCH] [strategies][distance] eliminate the distance_comparable_to_regular class --- .../distance_comparable_to_regular.hpp | 107 ------------------ .../distance_comparable_to_regular.hpp | 53 --------- .../boost/geometry/strategies/strategies.hpp | 1 - 3 files changed, 161 deletions(-) delete mode 100644 include/boost/geometry/strategies/cartesian/distance_comparable_to_regular.hpp delete mode 100644 include/boost/geometry/strategies/distance_comparable_to_regular.hpp diff --git a/include/boost/geometry/strategies/cartesian/distance_comparable_to_regular.hpp b/include/boost/geometry/strategies/cartesian/distance_comparable_to_regular.hpp deleted file mode 100644 index cf432ee82..000000000 --- a/include/boost/geometry/strategies/cartesian/distance_comparable_to_regular.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2014, Oracle and/or its affiliates. - -// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle - -// Licensed under the Boost Software License version 1.0. -// http://www.boost.org/users/license.html - -#ifndef BOOST_GEOMETRY_STRATEGIES_CARTESIAN_DISTANCE_COMPARABLE_TO_REGULAR_HPP -#define BOOST_GEOMETRY_STRATEGIES_CARTESIAN_DISTANCE_COMPARABLE_TO_REGULAR_HPP - - -#include -#include -#include -#include - -namespace boost { namespace geometry -{ - -namespace strategy { namespace distance -{ - - - -#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS -namespace services -{ - - -template -< - typename ComparableStrategy, - typename Strategy, - typename Geometry1, - typename Geometry2 -> -struct comparable_to_regular - < - ComparableStrategy, Strategy, - Geometry1, Geometry2, - cartesian_tag, cartesian_tag - > -{ - typedef typename return_type - < - Strategy, - typename point_type::type, - typename point_type::type - >::type calculation_type; - - typedef typename return_type - < - ComparableStrategy, - typename point_type::type, - typename point_type::type - >::type comparable_calculation_type; - - static inline calculation_type apply(comparable_calculation_type const& cd) - { - return math::sqrt( boost::numeric_cast(cd) ); - } -}; - - - -template -struct comparable_to_regular - < - ComparableStrategy, - ComparableStrategy, - Geometry1, - Geometry2, - cartesian_tag, - cartesian_tag - > -{ - typedef typename return_type - < - ComparableStrategy, - typename point_type::type, - typename point_type::type - >::type comparable_calculation_type; - - static inline comparable_calculation_type - apply(comparable_calculation_type const& cd) - { - return cd; - } -}; - - - - - - - -} // namespace services -#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS - - -}} // namespace strategy::distance - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_STRATEGIES_CARTESIAN_DISTANCE_COMPARABLE_TO_REGULAR_HPP diff --git a/include/boost/geometry/strategies/distance_comparable_to_regular.hpp b/include/boost/geometry/strategies/distance_comparable_to_regular.hpp deleted file mode 100644 index 88f51eb15..000000000 --- a/include/boost/geometry/strategies/distance_comparable_to_regular.hpp +++ /dev/null @@ -1,53 +0,0 @@ -// Boost.Geometry (aka GGL, Generic Geometry Library) - -// Copyright (c) 2014, Oracle and/or its affiliates. - -// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle - -// Licensed under the Boost Software License version 1.0. -// http://www.boost.org/users/license.html - -#ifndef BOOST_GEOMETRY_STRATEGIES_DISTANCE_COMPARABLE_TO_REGULAR_HPP -#define BOOST_GEOMETRY_STRATEGIES_DISTANCE_COMPARABLE_TO_REGULAR_HPP - -#include -#include -#include - - -namespace boost { namespace geometry -{ - -namespace strategy { namespace distance -{ - - - -#ifndef DOXYGEN_NO_STRATEGY_SPECIALIZATIONS -namespace services -{ - - -template -< - typename ComparableStrategy, - typename Strategy, - typename Geometry1, - typename Geometry2, - typename CsTag1 = typename cs_tag::type, - typename CsTag2 = typename cs_tag::type -> -struct comparable_to_regular - : geometry::not_implemented -{}; - - -} // namespace services -#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS - - -}} // namespace strategy::distance - -}} // namespace boost::geometry - -#endif // BOOST_GEOMETRY_STRATEGIES_DISTANCE_COMPARABLE_TO_REGULAR_HPP diff --git a/include/boost/geometry/strategies/strategies.hpp b/include/boost/geometry/strategies/strategies.hpp index 5e70e8a02..4edaa3bd1 100644 --- a/include/boost/geometry/strategies/strategies.hpp +++ b/include/boost/geometry/strategies/strategies.hpp @@ -55,7 +55,6 @@ #include #include #include -#include #include #include