]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/algorithms/set_operations/test_set_ops_pointlike.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / set_operations / test_set_ops_pointlike.hpp
index 6908aa55295ebe458f870bd3e317c2d04646c15a..494e8f1b8d6d63e3696ef4bd43580d167911a635 100644 (file)
@@ -1,7 +1,6 @@
 // Boost.Geometry (aka GGL, Generic Geometry Library)
 
-// Copyright (c) 2014-2020, Oracle and/or its affiliates.
-
+// 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
 
 #define BOOST_GEOMETRY_TEST_SET_OPS_POINTLIKE_HPP
 
 
-#include <boost/geometry/geometry.hpp>
-
-namespace bg = ::boost::geometry;
-
 #include <from_wkt.hpp>
-#include <to_svg.hpp>
 
 #include <algorithm>
 #include <fstream>
-#include <boost/core/ignore_unused.hpp>
-#include <boost/typeof/typeof.hpp>
 
-#include <boost/geometry/policies/compare.hpp>
-#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/size.hpp>
 
-#include <boost/geometry/algorithms/union.hpp>
+#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
 #include <boost/geometry/algorithms/difference.hpp>
+#include <boost/geometry/algorithms/equals.hpp>
 #include <boost/geometry/algorithms/intersection.hpp>
 #include <boost/geometry/algorithms/sym_difference.hpp>
+#include <boost/geometry/algorithms/union.hpp>
+#include <boost/geometry/io/wkt/write.hpp>
+#include <boost/geometry/policies/compare.hpp>
 
-#include <boost/geometry/algorithms/detail/overlay/overlay_type.hpp>
+#if defined(TEST_WITH_SVG)
+#include <boost/geometry/io/svg/svg_mapper.hpp>
+#endif
+
+namespace bg = ::boost::geometry;
 
 
 //==================================================================
@@ -50,15 +52,13 @@ void set_operation_output(std::string const& set_op_id,
     boost::ignore_unused(set_op_id, caseid, g1, g2, output);
 
 #if defined(TEST_WITH_SVG)
-    typedef typename bg::coordinate_type<G1>::type coordinate_type;
-    typedef typename bg::point_type<G1>::type point_type;
 
     std::ostringstream filename;
     filename << "svgs/" << set_op_id << "_" << caseid << ".svg";
 
     std::ofstream svg(filename.str().c_str());
 
-    bg::svg_mapper<point_type> mapper(svg, 500, 500);
+    bg::svg_mapper<typename bg::point_type<G1>::type> mapper(svg, 500, 500);
 
     mapper.add(g1);
     mapper.add(g2);
@@ -66,8 +66,7 @@ void set_operation_output(std::string const& set_op_id,
     mapper.map(g2, "stroke-opacity:1;stroke:rgb(153,204,0);stroke-width:4");
     mapper.map(g1, "stroke-opacity:1;stroke:rgb(51,51,153);stroke-width:2");
 
-    BOOST_AUTO_TPL(it, output.begin());
-    for (; it != output.end(); ++it)
+    for (auto it = output.begin(); it != output.end(); ++it)
     {
         mapper.map(*it,
                    "fill:rgb(255,0,255);stroke:rgb(0,0,0);stroke-width:1",
@@ -103,8 +102,8 @@ struct equals
             return false;
         }
 
-        BOOST_AUTO_TPL(it1, boost::begin(mp1));
-        BOOST_AUTO_TPL(it2, boost::begin(mp2));
+        auto it1 = boost::begin(mp1);
+        auto it2 = boost::begin(mp2);
         for (; it1 != boost::end(mp1); ++it1, ++it2)
         {
             if ( !bg::equals(*it1, *it2) )