Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / geometry / strategies / distance.hpp
index ef9a7ee..98ccb82 100644 (file)
@@ -1,8 +1,13 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
+
+// This file was modified by Oracle on 2014.
+// Modifications copyright (c) 2014, Oracle and/or its affiliates.
+
+// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
 
 // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
 // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
@@ -30,47 +35,16 @@ namespace strategy { namespace distance { namespace services
 
 
 template <typename Strategy> struct tag {};
-template <typename Strategy> struct return_type
-{
-    BOOST_MPL_ASSERT_MSG
-        (
-            false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy>)
-        );
-};
-
 
-/*!
-    \brief Metafunction delivering a similar strategy with other input point types
-*/
-template
-<
-    typename Strategy,
-    typename Point1,
-    typename Point2
->
-struct similar_type
+template <typename Strategy, typename P1, typename P2>
+struct return_type
 {
     BOOST_MPL_ASSERT_MSG
         (
-            false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY
-            , (types<Strategy, Point1, Point2>)
+            false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY, (types<Strategy, P1, P2>)
         );
 };
 
-template
-<
-    typename Strategy,
-    typename Point1,
-    typename Point2
->
-struct get_similar
-{
-    BOOST_MPL_ASSERT_MSG
-        (
-            false, NOT_IMPLEMENTED_FOR_THIS_STRATEGY
-            , (types<Strategy, Point1, Point2>)
-        );
-};
 
 template <typename Strategy> struct comparable_type
 {
@@ -88,11 +62,10 @@ template <typename Strategy> struct get_comparable
         );
 };
 
-template <typename Strategy> struct result_from_distance {};
+template <typename Strategy, typename P1, typename P2>
+struct result_from_distance {};
 
 
-// For point-segment only:
-template <typename Strategy> struct strategy_point_point {};
 
 
 // Default strategy
@@ -102,7 +75,8 @@ template <typename Strategy> struct strategy_point_point {};
     \brief Traits class binding a default strategy for distance
         to one (or possibly two) coordinate system(s)
     \ingroup distance
-    \tparam GeometryTag tag (point/segment) for which this strategy is the default
+    \tparam GeometryTag1 tag (point/segment/box) for which this strategy is the default
+    \tparam GeometryTag2 tag (point/segment/box) for which this strategy is the default
     \tparam Point1 first point-type
     \tparam Point2 second point-type
     \tparam CsTag1 tag of coordinate system of first point type
@@ -110,7 +84,8 @@ template <typename Strategy> struct strategy_point_point {};
 */
 template
 <
-    typename GeometryTag,
+    typename GeometryTag1,
+    typename GeometryTag2,
     typename Point1,
     typename Point2 = Point1,
     typename CsTag1 = typename cs_tag<Point1>::type,