]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/geometry/strategies/default_length_result.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / geometry / strategies / default_length_result.hpp
index 28e3b1441238e939ab6289b9901655e39e9d4d2c..7739cb834cbbeaf7d98ce7a0dda254c06f883e41 100644 (file)
@@ -4,10 +4,10 @@
 // Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
 // Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
 
-// This file was modified by Oracle on 2014-2020.
-// Modifications copyright (c) 2014-2020, Oracle and/or its affiliates.
-
+// This file was modified by Oracle on 2014-2021.
+// Modifications copyright (c) 2014-2021, Oracle and/or its affiliates.
 // Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, 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.
@@ -20,8 +20,7 @@
 #define BOOST_GEOMETRY_STRATEGIES_DEFAULT_LENGTH_RESULT_HPP
 
 
-#include <boost/variant/variant_fwd.hpp>
-
+#include <boost/geometry/algorithms/detail/select_geometry_type.hpp>
 #include <boost/geometry/core/coordinate_type.hpp>
 #include <boost/geometry/util/select_most_precise.hpp>
 #include <boost/geometry/util/type_traits.hpp>
@@ -40,51 +39,32 @@ namespace resolve_strategy
 // It would probably be enough to use distance_result and
 //   default_distance_result here.
 
+} // namespace resolve_strategy
 
-// Workaround for VS2015
-#if defined(_MSC_VER) && (_MSC_VER < 1910)
-template
-<
-    typename Geometry,
-    bool IsGeometry = util::is_geometry<Geometry>::value
->
-struct coordinate_type
-    : geometry::coordinate_type<Geometry>
-{};
-template <typename Geometry>
-struct coordinate_type<Geometry, false>
+
+namespace resolve_dynamic
 {
-    typedef long double type;
-};
-#endif
+
+template <typename Sequence>
+struct default_length_result_impl;
 
 template <typename ...Geometries>
-struct default_length_result
+struct default_length_result_impl<util::type_sequence<Geometries...>>
 {
-    typedef typename select_most_precise
+    using type = typename select_most_precise
         <
             typename coordinate_type<Geometries>::type...,
             long double
-        >::type type;
+        >::type;
 };
 
-} // namespace resolve_strategy
-
-
-namespace resolve_variant
-{
-
 template <typename Geometry>
 struct default_length_result
-    : resolve_strategy::default_length_result<Geometry>
+    : default_length_result_impl<typename detail::geometry_types<Geometry>::type>
 {};
 
-template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
-struct default_length_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
-    : resolve_strategy::default_length_result<BOOST_VARIANT_ENUM_PARAMS(T)>
-{};
 
-} // namespace resolve_variant
+} // namespace resolve_dynamic
 
 
 /*!
@@ -97,7 +77,7 @@ struct default_length_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
  */
 template <typename Geometry>
 struct default_length_result
-    : resolve_variant::default_length_result<Geometry>
+    : resolve_dynamic::default_length_result<Geometry>
 {};