diff --git a/test/algorithms/area/area.cpp b/test/algorithms/area/area.cpp
index 7f6f28d88..ee107465e 100644
--- a/test/algorithms/area/area.cpp
+++ b/test/algorithms/area/area.cpp
@@ -73,13 +73,13 @@ void test_all()
("POLYGON((1 0,0 1,-1 0,0 -1,1 0))", 2);
typedef typename bg::coordinate_type
::type coord_type;
- if (BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
test_geometry >
("POLYGON((100000001 100000000, 100000000 100000001, \
99999999 100000000, 100000000 99999999))", 2);
}
- else if (BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ else if (BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
test_geometry >
("POLYGON((100001 100000, 100000 100001, \
diff --git a/test/algorithms/area/area_sph_geo.cpp b/test/algorithms/area/area_sph_geo.cpp
index cda94d165..c9b47bfe1 100644
--- a/test/algorithms/area/area_sph_geo.cpp
+++ b/test/algorithms/area/area_sph_geo.cpp
@@ -6,9 +6,8 @@
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2015, 2016, 2017.
-// Modifications copyright (c) 2015-2017, Oracle and/or its affiliates.
-
+// This file was modified by Oracle on 2015-2021.
+// Modifications copyright (c) 2015-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -430,7 +429,7 @@ void test_spherical_geo()
/*if (polar)
{
// Create colatitudes (measured from pole)
- BOOST_FOREACH(pt& p, aurha)
+ for (pt& p : aurha)
{
bg::set<1>(p, ct(90) - bg::get<1>(p));
}
diff --git a/test/algorithms/buffer/buffer_linestring.cpp b/test/algorithms/buffer/buffer_linestring.cpp
index 1c3f9dab4..b892ec30d 100644
--- a/test/algorithms/buffer/buffer_linestring.cpp
+++ b/test/algorithms/buffer/buffer_linestring.cpp
@@ -3,8 +3,8 @@
// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
-// This file was modified by Oracle on 2016.
-// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2016-2021.
+// Modifications copyright (c) 2016-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -128,7 +128,7 @@ void test_all()
ut_settings const settings;
ut_settings const specific_settings
- = BOOST_GEOMETRY_CONDITION((boost::is_same::value))
+ = BOOST_GEOMETRY_CONDITION((std::is_same::value))
? ut_settings(0.02) : settings;
// Simplex (join-type is not relevant)
@@ -258,7 +258,7 @@ void test_all()
test_one("mysql_report_2015_04_01", mysql_report_2015_04_01, join_round(32), end_round(32), 632.234, d100);
}
- if (! BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (! BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
ut_settings settings;
settings.tolerance = 0.1;
@@ -313,7 +313,7 @@ void test_all()
27862.733459829971,
5.9518403867035365);
- if (BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
test_one("mysql_report_2015_09_08a", mysql_report_2015_09_08a, join_round32, end_round32, 0.0, 1.0);
test_one("mysql_report_2015_09_08b", mysql_report_2015_09_08b, join_round32, end_round32, 0.0, 1099511627778.0);
@@ -390,7 +390,7 @@ template
void test_invalid()
{
typedef typename bg::coordinate_type::type coor_type;
- if (! BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (! BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
return;
}
diff --git a/test/algorithms/buffer/buffer_linestring_aimes.cpp b/test/algorithms/buffer/buffer_linestring_aimes.cpp
index d82708bb0..86279e0e1 100644
--- a/test/algorithms/buffer/buffer_linestring_aimes.cpp
+++ b/test/algorithms/buffer/buffer_linestring_aimes.cpp
@@ -3,6 +3,10 @@
// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.
+// This file was modified by Oracle on 2021.
+// Modifications copyright (c) 2021, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -425,7 +429,7 @@ void test_aimes()
typedef bg::model::polygon polygon;
typedef typename bg::coordinate_type
::type coor_type;
- if (BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
std::cout << "This unit test can't be tested with float,"
<< " the coordinate values are too small." << std::endl;
diff --git a/test/algorithms/buffer/buffer_multi_linestring.cpp b/test/algorithms/buffer/buffer_multi_linestring.cpp
index 0c454111a..4b06877aa 100644
--- a/test/algorithms/buffer/buffer_multi_linestring.cpp
+++ b/test/algorithms/buffer/buffer_multi_linestring.cpp
@@ -3,8 +3,8 @@
// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
-// This file was modified by Oracle on 2016.
-// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2016-2021.
+// Modifications copyright (c) 2016-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -141,7 +141,7 @@ void test_all()
test_one("mikado4_small", mikado4, join_round32, end_flat, 1930.785, 10.0);
}
- if (! BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (! BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
// Coordinates in one linestring vary so much that
// length = geometry::math::sqrt(dx * dx + dy * dy); returns a value of inf for length
diff --git a/test/algorithms/buffer/buffer_multi_polygon.cpp b/test/algorithms/buffer/buffer_multi_polygon.cpp
index edd78d591..03ab006ae 100644
--- a/test/algorithms/buffer/buffer_multi_polygon.cpp
+++ b/test/algorithms/buffer/buffer_multi_polygon.cpp
@@ -3,8 +3,8 @@
// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
-// This file was modified by Oracle on 2016.
-// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2016-2021.
+// Modifications copyright (c) 2016-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -657,7 +657,7 @@ void test_all()
join_round32, end_round32, 0.0, -10.0);
// Check cases with extreme coordinates on assertions
- if (BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
test_one("mysql_report_2015_07_05_1",
mysql_report_2015_07_05_1,
diff --git a/test/algorithms/buffer/buffer_polygon.cpp b/test/algorithms/buffer/buffer_polygon.cpp
index 6c1b70e7a..d1cd8e96a 100644
--- a/test/algorithms/buffer/buffer_polygon.cpp
+++ b/test/algorithms/buffer/buffer_polygon.cpp
@@ -3,8 +3,8 @@
// Copyright (c) 2012-2019 Barend Gehrels, Amsterdam, the Netherlands.
-// This file was modified by Oracle on 2016, 2019.
-// Modifications copyright (c) 2016, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2016-2021.
+// Modifications copyright (c) 2016-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -535,7 +535,7 @@ void test_all()
test_one("italy_part2_5", italy_part2,
join_round, end_flat, {12496082120, 12496082124}, 5 * 1000.0);
- if (! BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (! BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
ut_settings settings;
settings.set_test_validity(false);
@@ -571,7 +571,7 @@ void test_all()
test_one("ticket_10398_1_25", ticket_10398_1, join_miter, end_flat, 246.7329, -2.5);
}
- if (! BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (! BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
// Test issue 369 as reported (1.15e-3) and some variants
// Use high tolerance because output areas are very small
@@ -590,7 +590,7 @@ void test_all()
test_one("issue_369_1000", issue_369, jr, er, 7.881e-10, distance / 1000.0, specific);
}
- if (! BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (! BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
// Test issue 555 as reported (-0.000001) and some variants
bg::strategy::buffer::join_round jr(180);
@@ -639,7 +639,7 @@ void test_all()
mysql_report_2015_02_17_3,
join_round32, end_round32, 64.0, -1.0);
- if (BOOST_GEOMETRY_CONDITION((boost::is_same::value)))
+ if (BOOST_GEOMETRY_CONDITION((std::is_same::value)))
{
// These extreme testcases, containing huge coordinate differences
// and huge buffer distances, are to verify assertions.
diff --git a/test/algorithms/buffer/test_buffer.hpp b/test/algorithms/buffer/test_buffer.hpp
index 8a3d92d12..3691e6127 100644
--- a/test/algorithms/buffer/test_buffer.hpp
+++ b/test/algorithms/buffer/test_buffer.hpp
@@ -24,7 +24,6 @@
#include
#include
-#include
#include
#include
@@ -161,12 +160,12 @@ void test_buffer(std::string const& caseid,
typedef typename bg::tag::type tag;
// TODO use something different here:
- std::string type = boost::is_same::value ? "poly"
- : boost::is_same::value ? "line"
- : boost::is_same::value ? "point"
- : boost::is_same::value ? "multipoly"
- : boost::is_same::value ? "multiline"
- : boost::is_same::value ? "multipoint"
+ std::string type = std::is_same::value ? "poly"
+ : std::is_same::value ? "line"
+ : std::is_same::value ? "point"
+ : std::is_same::value ? "multipoly"
+ : std::is_same::value ? "multiline"
+ : std::is_same::value ? "multipoint"
: ""
;
@@ -184,8 +183,8 @@ void test_buffer(std::string const& caseid,
std::string end_name = EndTestProperties::name();
if ( BOOST_GEOMETRY_CONDITION((
- boost::is_same::value
- || boost::is_same::value )) )
+ std::is_same::value
+ || std::is_same::value )) )
{
join_name.clear();
}
diff --git a/test/algorithms/buffer/test_buffer_svg.hpp b/test/algorithms/buffer/test_buffer_svg.hpp
index 9d0fb9f85..f8df1b13f 100644
--- a/test/algorithms/buffer/test_buffer_svg.hpp
+++ b/test/algorithms/buffer/test_buffer_svg.hpp
@@ -3,8 +3,8 @@
// Copyright (c) 2010-2015 Barend Gehrels, Amsterdam, the Netherlands.
-// This file was modified by Oracle on 2020.
-// Modifications copyright (c) 2020 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2020-2021.
+// Modifications copyright (c) 2020-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -28,8 +28,8 @@
# endif
#endif
-#include
#include
+#include
#include
@@ -116,8 +116,7 @@ private :
std::map > offsets;
- for (typename boost::range_iterator::type it =
- boost::begin(turns); it != boost::end(turns); ++it)
+ for (auto it = boost::begin(turns); it != boost::end(turns); ++it)
{
if (m_zoom && bg::disjoint(it->point, m_alternate_box))
{
@@ -192,9 +191,7 @@ private :
typedef typename boost::range_value::type ring_type;
typedef typename bg::point_type::type point_type;
- for(typename boost::range_iterator::type it = boost::begin(pieces);
- it != boost::end(pieces);
- ++it)
+ for (auto it = boost::begin(pieces); it != boost::end(pieces); ++it)
{
const piece_type& piece = *it;
bg::segment_identifier seg_id = piece.first_seg_id;
@@ -274,8 +271,7 @@ private :
template
inline void map_traversed_rings(TraversedRings const& traversed_rings)
{
- for(typename boost::range_iterator::type it
- = boost::begin(traversed_rings); it != boost::end(traversed_rings); ++it)
+ for (auto it = boost::begin(traversed_rings); it != boost::end(traversed_rings); ++it)
{
m_mapper.map(*it, "opacity:0.4;fill:none;stroke:rgb(0,255,0);stroke-width:2");
}
@@ -284,8 +280,7 @@ private :
template
inline void map_offsetted_rings(OffsettedRings const& offsetted_rings)
{
- for(typename boost::range_iterator::type it
- = boost::begin(offsetted_rings); it != boost::end(offsetted_rings); ++it)
+ for (auto it = boost::begin(offsetted_rings); it != boost::end(offsetted_rings); ++it)
{
if (it->discarded())
{
@@ -349,14 +344,7 @@ public :
void map_input_output(Mapper& mapper, Geometry const& geometry,
GeometryBuffer const& buffered, bool negative)
{
- bool const areal = boost::is_same
- <
- typename bg::tag_cast
- <
- typename bg::tag::type,
- bg::areal_tag
- >::type, bg::areal_tag
- >::type::value;
+ bool const areal = bg::util::is_areal::value;
if (m_zoom)
{
@@ -385,7 +373,7 @@ public :
bg::detail::overlay::assign_null_policy
>(geometry, strategy, rescale_policy, turns, policy);
- BOOST_FOREACH(turn_info const& turn, turns)
+ for (turn_info const& turn : turns)
{
mapper.map(turn.point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1", 3);
}
diff --git a/test/algorithms/buffer/test_buffer_svg_per_turn.hpp b/test/algorithms/buffer/test_buffer_svg_per_turn.hpp
index e48d333d1..be01f4b95 100644
--- a/test/algorithms/buffer/test_buffer_svg_per_turn.hpp
+++ b/test/algorithms/buffer/test_buffer_svg_per_turn.hpp
@@ -2,6 +2,11 @@
// Unit Test Helper
// Copyright (c) 2010-2019 Barend Gehrels, Amsterdam, the Netherlands.
+
+// This file was modified by Oracle on 2021.
+// Modifications copyright (c) 2021, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -132,7 +137,7 @@ public :
return;
}
- BOOST_FOREACH(pair_type const& p, points)
+ for (pair_type const& p : points)
{
mappers.push_back(new mapper_visitor(complete_caseid, p.second, p.first));
}
diff --git a/test/algorithms/centroid.cpp b/test/algorithms/centroid.cpp
index 248ebc72b..e418cedce 100644
--- a/test/algorithms/centroid.cpp
+++ b/test/algorithms/centroid.cpp
@@ -5,9 +5,8 @@
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
-// This file was modified by Oracle on 2014, 2015.
-// Modifications copyright (c) 2014-2015 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 Adam Wulkiewicz, on behalf of Oracle
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
@@ -91,7 +90,7 @@ void test_2d()
coord_type m = (std::numeric_limits::max)();
bg::append(ls, P(coord_type(m), coord_type(-m)));
bg::append(ls, P(coord_type(0.0001), coord_type(0.000)));
- if (BOOST_GEOMETRY_CONDITION((boost::is_same::type, double>::value)))
+ if (BOOST_GEOMETRY_CONDITION((std::is_same::type, double>::value)))
{
// for doubles the INF is detected and the calculation stopped
// currently for Geometries for which the centroid can't be calculated
diff --git a/test/algorithms/check_validity.hpp b/test/algorithms/check_validity.hpp
index 388ca6fad..c02ff3f01 100644
--- a/test/algorithms/check_validity.hpp
+++ b/test/algorithms/check_validity.hpp
@@ -2,6 +2,10 @@
// Copyright (c) 2017 Barend Gehrels, Amsterdam, the Netherlands.
+// This file was modified by Oracle on 2021.
+// Modifications copyright (c) 2021, Oracle and/or its affiliates.
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
+
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -9,8 +13,6 @@
#ifndef BOOST_GEOMETRY_TEST_CHECK_VALIDITY_HPP
#define BOOST_GEOMETRY_TEST_CHECK_VALIDITY_HPP
-#include
-
#include
template
@@ -64,7 +66,7 @@ struct check_validity
std::string& message)
{
typedef typename boost::range_value::type single_type;
- BOOST_FOREACH(single_type const& element, geometry)
+ for (single_type const& element : geometry)
{
if (! is_output_valid(element, case_id, g1, g2, message))
{
diff --git a/test/algorithms/comparable_distance.cpp b/test/algorithms/comparable_distance.cpp
index bb96dc205..1df2e6a45 100644
--- a/test/algorithms/comparable_distance.cpp
+++ b/test/algorithms/comparable_distance.cpp
@@ -6,9 +6,8 @@
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
// Copyright (c) 2013-2014 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2014, 2017.
-// Modifications copyright (c) 2014-2017, 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
@@ -22,9 +21,6 @@
#include
-#include
-#include
-#include
#include
#include
@@ -188,8 +184,8 @@ struct test_variant_different_default_strategy
variant_type v1, v2;
- BOOST_MPL_ASSERT((
- boost::is_same
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same
<
typename bg::comparable_distance_result
<
@@ -199,8 +195,8 @@ struct test_variant_different_default_strategy
<
point_type, point_type, bg::default_strategy
>::type
- >
- ));
+ >::value),
+ "Unexpected result type");
// Default strategy
v1 = point;
@@ -261,27 +257,27 @@ struct test_variant_same_default_strategy
variant_type v1, v2;
- BOOST_MPL_ASSERT((
- boost::is_same
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same
<
typename bg::comparable_distance_result
<
variant_type, variant_type, bg::default_strategy
>::type,
ExpectedResultType
- >
- ));
+ >::value),
+ "Unexpected result type");
- BOOST_MPL_ASSERT((
- boost::is_same
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same
<
typename bg::comparable_distance_result
<
point_type, point_type, bg::default_strategy
>::type,
ExpectedResultType
- >
- ));
+ >::value),
+ "Unexpected result type");
// Default strategy
v1 = point;
@@ -352,27 +348,27 @@ struct test_variant_with_strategy
strategy_type strategy;
- BOOST_MPL_ASSERT((
- boost::is_same
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same
<
typename bg::comparable_distance_result
<
variant_type, variant_type, strategy_type
>::type,
ExpectedResultType
- >
- ));
+ >::value),
+ "Unexpected result type");
- BOOST_MPL_ASSERT((
- boost::is_same
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same
<
typename bg::comparable_distance_result
<
segment_type, linestring_type, strategy_type
>::type,
ExpectedResultType
- >
- ));
+ >::value),
+ "Unexpected result type");
// Passed strategy
v1 = seg;
@@ -422,7 +418,7 @@ struct test_variant_with_strategy
}
};
-template ::value>
+template ::value>
struct check_result
{
template
@@ -459,23 +455,24 @@ struct test_variant_boxes
variant_type v1 = box1, v2 = box2;
- typedef typename boost::mpl::if_c
+ typedef typename std::conditional
<
- boost::is_float::value,
+ std::is_floating_point::value,
double,
typename bg::util::detail::default_integral::type
>::type expected_result_type;
- BOOST_MPL_ASSERT((
- boost::is_same
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same
<
typename bg::comparable_distance_result
<
variant_type, variant_type, bg::default_strategy
>::type,
expected_result_type
- >
- ));
+ >::value),
+ "Unexpected result type"
+ );
// Default strategy
check_result::apply(bg::comparable_distance(v1, v2),
@@ -491,7 +488,7 @@ struct test_variant_boxes
int test_main(int, char* [])
{
test_double_result_from_integer();
- test_double_result_from_integer();
+ test_double_result_from_integer();
test_all >();
test_all >();
diff --git a/test/algorithms/covered_by/covered_by_sph_geo.cpp b/test/algorithms/covered_by/covered_by_sph_geo.cpp
index 665b2802f..94730d52c 100644
--- a/test/algorithms/covered_by/covered_by_sph_geo.cpp
+++ b/test/algorithms/covered_by/covered_by_sph_geo.cpp
@@ -1,6 +1,6 @@
// Boost.Geometry
-// Copyright (c) 2016 Oracle and/or its affiliates.
+// Copyright (c) 2016-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -82,12 +82,12 @@ void test_box_box()
template
void test_point_polygon()
{
- typename boost::mpl::if_
+ std::conditional_t
<
- boost::is_same::type, bg::geographic_tag>,
+ std::is_same::type, bg::geographic_tag>::value,
bg::strategy::within::geographic_winding,
bg::strategy::within::spherical_winding
- >::type s;
+ > s;
typedef bg::model::polygon
poly;
diff --git a/test/algorithms/detail/calculate_point_order.cpp b/test/algorithms/detail/calculate_point_order.cpp
index 401136313..38922155f 100644
--- a/test/algorithms/detail/calculate_point_order.cpp
+++ b/test/algorithms/detail/calculate_point_order.cpp
@@ -1,8 +1,7 @@
// Boost.Geometry
// Unit Test
-// Copyright (c) 2019, Oracle and/or its affiliates.
-
+// Copyright (c) 2019-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
@@ -89,7 +88,7 @@ inline void test_one(std::string const& ring_wkt, bg::order_selector expected)
std::rotate(boost::begin(ring), boost::begin(ring) + 1, boost::end(ring));
// it seems that area method doesn't work for invalid "opened" polygons
- //if (! boost::is_same::value)
+ //if (! std::is_same::value)
{
P p = bg::range::front(ring);
bg::range::push_back(ring, p);
diff --git a/test/algorithms/detail/partition.cpp b/test/algorithms/detail/partition.cpp
index 9d63668d8..c1549f729 100644
--- a/test/algorithms/detail/partition.cpp
+++ b/test/algorithms/detail/partition.cpp
@@ -3,8 +3,8 @@
// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2017 Adam Wulkiewicz, Lodz, Poland.
//
-// This file was modified by Oracle on 2017, 2018.
-// Modifications copyright (c) 2017-2018 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2017-2021.
+// Modifications copyright (c) 2017-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
//
// Use, modification and distribution is subject to the Boost Software License,
@@ -15,19 +15,20 @@
#include
+#include
+#include
+#include
+#include
+#include
-#include
#include
#include
#include
-#include
-
-#include
-
#if defined(TEST_WITH_SVG)
# include
#endif
+#include
#include
#include
@@ -151,7 +152,7 @@ void test_boxes(std::string const& wkt_box_list, double expected_area, int expec
std::vector boxes;
int index = 1;
- BOOST_FOREACH(std::string const& wkt, wkt_boxes)
+ for (std::string const& wkt : wkt_boxes)
{
boxes.push_back(sample(index++, wkt));
}
@@ -229,10 +230,10 @@ void test_points(std::string const& wkt1, std::string const& wkt2, int expected_
bg::read_wkt(wkt2, mp2);
int id = 1;
- BOOST_FOREACH(point_item& p, mp1)
+ for (point_item& p : mp1)
{ p.id = id++; }
id = 1;
- BOOST_FOREACH(point_item& p, mp2)
+ for (point_item& p : mp2)
{ p.id = id++; }
point_visitor visitor;
@@ -352,9 +353,9 @@ void test_many_points(int seed, int size, int count)
// Test equality in quadratic loop
int expected_count = 0;
- BOOST_FOREACH(point_item const& item1, mp1)
+ for (point_item const& item1 : mp1)
{
- BOOST_FOREACH(point_item const& item2, mp2)
+ for (point_item const& item2 : mp2)
{
if (bg::equals(item1, item2))
{
@@ -395,11 +396,11 @@ void test_many_points(int seed, int size, int count)
BOOST_CHECK_EQUAL(visitor.count, expected_count);
#if defined(TEST_WITH_SVG)
- BOOST_FOREACH(point_item const& item, mp1)
+ for (point_item const& item : mp1)
{
mapper.map(item, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1", 8);
}
- BOOST_FOREACH(point_item const& item, mp2)
+ for (point_item const& item : mp2)
{
mapper.map(item, "fill:rgb(0,128,255);stroke:rgb(0,0,100);stroke-width:1", 4);
}
@@ -447,9 +448,9 @@ void test_many_boxes(int seed, int size, int count)
// Test equality in quadratic loop
int expected_count = 0;
double expected_area = 0.0;
- BOOST_FOREACH(box_item const& item1, boxes)
+ for (box_item const& item1 : boxes)
{
- BOOST_FOREACH(box_item const& item2, boxes)
+ for (box_item const& item2 : boxes)
{
if (item1.id < item2.id)
{
@@ -478,7 +479,7 @@ void test_many_boxes(int seed, int size, int count)
p.x = size + 1; p.y = size + 1; mapper.add(p);
}
- BOOST_FOREACH(box_item const& item, boxes)
+ for (box_item const& item : boxes)
{
mapper.map(item.box, "opacity:0.6;fill:rgb(50,50,210);stroke:rgb(0,0,0);stroke-width:1");
}
@@ -515,9 +516,9 @@ void test_two_collections(int seed1, int seed2, int size, int count)
// Get expectations in quadratic loop
int expected_count = 0;
double expected_area = 0.0;
- BOOST_FOREACH(box_item const& item1, boxes1)
+ for (box_item const& item1 : boxes1)
{
- BOOST_FOREACH(box_item const& item2, boxes2)
+ for (box_item const& item2 : boxes2)
{
if (bg::intersects(item1.box, item2.box))
{
@@ -543,11 +544,11 @@ void test_two_collections(int seed1, int seed2, int size, int count)
p.x = size + 1; p.y = size + 1; mapper.add(p);
}
- BOOST_FOREACH(box_item const& item, boxes1)
+ for (box_item const& item : boxes1)
{
mapper.map(item.box, "opacity:0.6;fill:rgb(50,50,210);stroke:rgb(0,0,0);stroke-width:1");
}
- BOOST_FOREACH(box_item const& item, boxes2)
+ for (box_item const& item : boxes2)
{
mapper.map(item.box, "opacity:0.6;fill:rgb(0,255,0);stroke:rgb(0,0,0);stroke-width:1");
}
@@ -584,9 +585,9 @@ void test_heterogenuous_collections(int seed1, int seed2, int size, int count)
// Get expectations in quadratic loop
int expected_count = 0;
- BOOST_FOREACH(point_item const& point, points)
+ for (point_item const& point : points)
{
- BOOST_FOREACH(box_item const& box_item, boxes)
+ for (box_item const& box_item : boxes)
{
if (bg::within(point, box_item.box))
{
@@ -609,11 +610,11 @@ void test_heterogenuous_collections(int seed1, int seed2, int size, int count)
p.x = size + 1; p.y = size + 1; mapper.add(p);
}
- BOOST_FOREACH(point_item const& point, points)
+ for (point_item const& point : points)
{
mapper.map(point, "fill:rgb(255,128,0);stroke:rgb(0,0,100);stroke-width:1", 8);
}
- BOOST_FOREACH(box_item const& item, boxes)
+ for (box_item const& item : boxes)
{
mapper.map(item.box, "opacity:0.6;fill:rgb(0,255,0);stroke:rgb(0,0,0);stroke-width:1");
}
diff --git a/test/algorithms/detail/sections/range_by_section.cpp b/test/algorithms/detail/sections/range_by_section.cpp
index 1069c4905..b963a759d 100644
--- a/test/algorithms/detail/sections/range_by_section.cpp
+++ b/test/algorithms/detail/sections/range_by_section.cpp
@@ -11,7 +11,7 @@
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include
+
#include
#define BOOST_GEOMETRY_UNIT_TEST_SECTIONALIZE
@@ -58,7 +58,7 @@ void test_sectionalize(std::string const /*caseid*/, Geometry const& geometry, s
view_type const
>::type range_iterator;
- BOOST_FOREACH(typename sections::value_type const& sec, s)
+ for (typename sections::value_type const& sec : s)
{
cview_type cview(bg::range_by_section(geometry, sec));
view_type view(cview);
diff --git a/test/algorithms/detail/sections/sectionalize.cpp b/test/algorithms/detail/sections/sectionalize.cpp
index ce448a1fd..6493c2561 100644
--- a/test/algorithms/detail/sections/sectionalize.cpp
+++ b/test/algorithms/detail/sections/sectionalize.cpp
@@ -5,8 +5,8 @@
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// This file was modified by Oracle on 2020.
-// Modifications copyright (c) 2020, Oracle and/or its affiliates.
+// This file was modified by Oracle on 2020-2021.
+// Modifications copyright (c) 2020-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
@@ -102,7 +102,7 @@ void test_sectionalize(std::string const& caseid, G const& g, std::size_t sectio
// Check if sections are consecutive and consistent
int previous_index = -1;
- BOOST_FOREACH(typename sections::value_type const& sec, s)
+ for (typename sections::value_type const& sec : s)
{
if (sec.begin_index > 0)
{
diff --git a/test/algorithms/detail/tupled_output.cpp b/test/algorithms/detail/tupled_output.cpp
index 3454f307b..8b9265a2b 100644
--- a/test/algorithms/detail/tupled_output.cpp
+++ b/test/algorithms/detail/tupled_output.cpp
@@ -1,8 +1,7 @@
// Boost.Geometry
// Unit Test
-// Copyright (c) 2019 Oracle and/or its affiliates.
-
+// Copyright (c) 2019-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Use, modification and distribution is subject to the Boost Software License,
@@ -34,14 +33,14 @@ template
void test_range_values()
{
typedef typename bgd::tupled_range_values::type tuple_s;
- BOOST_CHECK_EQUAL((boost::is_same::value), true);
+ BOOST_CHECK_EQUAL((std::is_same::value), true);
}
template
void test_back_inserters()
{
typedef typename bgd::tupled_back_inserters::type tuple_bi;
- BOOST_CHECK_EQUAL((boost::is_same::value), true);
+ BOOST_CHECK_EQUAL((std::is_same::value), true);
TupleM tup;
bgd::tupled_back_inserters::apply(tup);
diff --git a/test/algorithms/distance/distance.cpp b/test/algorithms/distance/distance.cpp
index 30e8eb63f..dbf66afe0 100644
--- a/test/algorithms/distance/distance.cpp
+++ b/test/algorithms/distance/distance.cpp
@@ -5,6 +5,9 @@
// Copyright (c) 2008-2015 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
+// Copyright (c) 2021 Oracle and/or its affiliates.
+// 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 +23,6 @@
#include "test_distance.hpp"
#include
-#include
-#include
#include
#include
@@ -81,7 +82,9 @@ void test_distance_point()
BOOST_CONCEPT_ASSERT( (bg::concepts::PointDistanceStrategy) );
typedef typename services::return_type::type cab_return_type;
- BOOST_MPL_ASSERT((boost::is_same::type>));
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same::type>::value),
+ "Unexpected result type");
taxicab_distance tcd;
cab_return_type d = bg::distance(p1, p2, tcd);
@@ -412,8 +415,8 @@ void test_large_integers()
bg::read_wkt(a, da);
bg::read_wkt(b, db);
- BOOST_AUTO(idist, bg::distance(ia, ib));
- BOOST_AUTO(ddist, bg::distance(da, db));
+ auto const idist = bg::distance(ia, ib);
+ auto const ddist = bg::distance(da, db);
BOOST_CHECK_MESSAGE(std::abs(idist - ddist) < 0.1,
"within different from within");
@@ -431,8 +434,8 @@ void test_large_integers()
bg::read_wkt(a, da);
bg::read_wkt(b, db);
- BOOST_AUTO(idist, bg::distance(ia, ib));
- BOOST_AUTO(ddist, bg::distance(da, db));
+ auto const idist = bg::distance(ia, ib);
+ auto const ddist = bg::distance(da, db);
BOOST_CHECK_MESSAGE(std::abs(idist - ddist) < 0.1,
"within different from within");
@@ -457,16 +460,16 @@ void test_variant()
variant_type v1, v2;
- BOOST_MPL_ASSERT((
- boost::is_same
+ BOOST_GEOMETRY_STATIC_ASSERT(
+ (std::is_same
<
typename bg::distance_result
<
variant_type, variant_type, bg::default_strategy
>::type,
double
- >
- ));
+ >::value),
+ "Unexpected result type");
// Default strategy
v1 = point;
diff --git a/test/algorithms/distance/distance_brute_force.hpp b/test/algorithms/distance/distance_brute_force.hpp
index 1e5b8b998..64ad16cd6 100644
--- a/test/algorithms/distance/distance_brute_force.hpp
+++ b/test/algorithms/distance/distance_brute_force.hpp
@@ -1,8 +1,7 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2014-2020 Oracle and/or its affiliates.
-
+// Copyright (c) 2014-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -15,8 +14,6 @@
#include
-#include
-#include
#include
#include
#include
@@ -46,17 +43,13 @@ struct distance_from_bg
{
template
struct use_distance_from_bg
- {
- typedef typename boost::mpl::or_
+ : util::bool_constant
<
- boost::is_same::type, point_tag>,
- typename boost::mpl::or_
- <
- boost::is_same::type, segment_tag>,
- boost::is_same::type, box_tag>
- >::type
- >::type type;
- };
+ std::is_same::type, point_tag>::value
+ || std::is_same::type, segment_tag>::value
+ || std::is_same::type, box_tag>::value
+ >
+ {};
template
static inline
@@ -65,8 +58,10 @@ struct distance_from_bg
Geometry2 const& geometry2,
Strategy const& strategy)
{
- BOOST_MPL_ASSERT((typename use_distance_from_bg::type));
- BOOST_MPL_ASSERT((typename use_distance_from_bg::type));
+ BOOST_GEOMETRY_STATIC_ASSERT((use_distance_from_bg::value),
+ "Unexpected kind of Geometry1");
+ BOOST_GEOMETRY_STATIC_ASSERT((use_distance_from_bg::value),
+ "Unexpected kind of Geometry1");
return geometry::distance(geometry1, geometry2, strategy);
}
diff --git a/test/algorithms/distance/distance_geo_linear_box.cpp b/test/algorithms/distance/distance_geo_linear_box.cpp
index b7287201d..bb9abac29 100644
--- a/test/algorithms/distance/distance_geo_linear_box.cpp
+++ b/test/algorithms/distance/distance_geo_linear_box.cpp
@@ -1,25 +1,24 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2017-2020 Oracle and/or its affiliates.
-
+// Copyright (c) 2017-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include
+#endif
+
+#include
#ifndef BOOST_TEST_MODULE
#define BOOST_TEST_MODULE test_distance_geographic_linear_areal
#endif
-#include
-
#include
-#include
-#include
#include "test_distance_geo_common.hpp"
//#include "test_empty_geometry.hpp"
diff --git a/test/algorithms/distance/distance_se_geo_ar_ar.cpp b/test/algorithms/distance/distance_se_geo_ar_ar.cpp
index 449ea50b0..a0b809af9 100644
--- a/test/algorithms/distance/distance_se_geo_ar_ar.cpp
+++ b/test/algorithms/distance/distance_se_geo_ar_ar.cpp
@@ -1,8 +1,7 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2017-2020 Oracle and/or its affiliates.
-
+// Copyright (c) 2017-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
@@ -13,11 +12,7 @@
#define BOOST_TEST_MODULE test_distance_geographic_areal_areal
#endif
-#include
-
#include
-#include
-#include
#include "test_distance_geo_common.hpp"
#include "test_empty_geometry.hpp"
diff --git a/test/algorithms/distance/distance_se_geo_l_ar.cpp b/test/algorithms/distance/distance_se_geo_l_ar.cpp
index dca46a264..ae26ce6b7 100644
--- a/test/algorithms/distance/distance_se_geo_l_ar.cpp
+++ b/test/algorithms/distance/distance_se_geo_l_ar.cpp
@@ -1,25 +1,22 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2017-2020 Oracle and/or its affiliates.
-
+// Copyright (c) 2017-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include
+#endif
#ifndef BOOST_TEST_MODULE
#define BOOST_TEST_MODULE test_distance_geographic_linear_areal
#endif
-#include
-
#include
-#include
-#include
#include "test_distance_geo_common.hpp"
#include "test_empty_geometry.hpp"
diff --git a/test/algorithms/distance/distance_se_geo_l_l.cpp b/test/algorithms/distance/distance_se_geo_l_l.cpp
index 7f0119f59..75d3b9b5e 100644
--- a/test/algorithms/distance/distance_se_geo_l_l.cpp
+++ b/test/algorithms/distance/distance_se_geo_l_l.cpp
@@ -1,25 +1,22 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2018-2020 Oracle and/or its affiliates.
-
+// Copyright (c) 2018-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include
+#endif
#ifndef BOOST_TEST_MODULE
#define BOOST_TEST_MODULE test_distance_geographic_linear_linear
#endif
-#include
-
#include
-#include
-#include
#include "test_distance_geo_common.hpp"
#include "test_empty_geometry.hpp"
diff --git a/test/algorithms/distance/distance_se_geo_pl_ar.cpp b/test/algorithms/distance/distance_se_geo_pl_ar.cpp
index bd8fce71b..67ca9fadd 100644
--- a/test/algorithms/distance/distance_se_geo_pl_ar.cpp
+++ b/test/algorithms/distance/distance_se_geo_pl_ar.cpp
@@ -1,25 +1,22 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2017-2020, Oracle and/or its affiliates.
-
+// Copyright (c) 2017-2021 Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
+#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include
+#endif
#ifndef BOOST_TEST_MODULE
#define BOOST_TEST_MODULE test_distance_geographic_pointlike_areal
#endif
-#include
-
#include
-#include
-#include
#include "test_distance_geo_common.hpp"
#include "test_empty_geometry.hpp"
diff --git a/test/algorithms/distance/test_distance_common.hpp b/test/algorithms/distance/test_distance_common.hpp
index fb8002f99..88c2747d5 100644
--- a/test/algorithms/distance/test_distance_common.hpp
+++ b/test/algorithms/distance/test_distance_common.hpp
@@ -1,8 +1,7 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2014-2017, 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
@@ -16,28 +15,16 @@
#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+
+#include
#include
#include
-#include
-#include
-#include
-
#include
#include
@@ -207,11 +194,11 @@ private:
Strategy, G1, G2
>::type distance_result_from_strategy;
- static const bool same_regular = boost::is_same
+ static const bool same_regular = std::is_same
<
default_distance_result,
distance_result_from_strategy
- >::type::value;
+ >::value;
BOOST_CHECK( same_regular );
@@ -231,11 +218,11 @@ private:
G2
>::type comparable_distance_result_from_strategy;
- static const bool same_comparable = boost::is_same
+ static const bool same_comparable = std::is_same
<
default_comparable_distance_result,
comparable_distance_result_from_strategy
- >::type::value;
+ >::value;
BOOST_CHECK( same_comparable );
diff --git a/test/algorithms/distance/test_distance_geo_common.hpp b/test/algorithms/distance/test_distance_geo_common.hpp
index 7620c883a..58695c16c 100644
--- a/test/algorithms/distance/test_distance_geo_common.hpp
+++ b/test/algorithms/distance/test_distance_geo_common.hpp
@@ -1,9 +1,9 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
-// Copyright (c) 2016-2017, Oracle and/or its affiliates.
-
+// Copyright (c) 2016-2021, Oracle and/or its affiliates.
// Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
+// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
@@ -14,29 +14,18 @@
#include
#include
-#include
-#include
-#include
+#include
+#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include