// Copyright (c) 2009-2015 Mateusz Loskot, London, UK.
// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
-// This file was modified by Oracle on 2013, 2014, 2015, 2017, 2018, 2019.
-// Modifications copyright (c) 2013-2019 Oracle and/or its affiliates.
+// This file was modified by Oracle on 2013-2020.
+// Modifications copyright (c) 2013-2020 Oracle and/or its affiliates.
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_SECTIONS_SECTIONALIZE_HPP
#include <cstddef>
+#include <type_traits>
#include <vector>
#include <boost/concept/requires.hpp>
#include <boost/core/ignore_unused.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/vector_c.hpp>
-#include <boost/range.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/size.hpp>
+#include <boost/range/value_type.hpp>
#include <boost/geometry/core/config.hpp>
#include <boost/geometry/algorithms/assign.hpp>
#include <boost/geometry/algorithms/envelope.hpp>
#include <boost/geometry/algorithms/expand.hpp>
-
+#include <boost/geometry/algorithms/detail/expand_by_epsilon.hpp>
#include <boost/geometry/algorithms/detail/interior_iterator.hpp>
#include <boost/geometry/algorithms/detail/recalculate.hpp>
#include <boost/geometry/algorithms/detail/ring_identifier.hpp>
#include <boost/geometry/algorithms/detail/signed_size_type.hpp>
+#include <boost/geometry/algorithms/detail/buffer/buffer_box.hpp>
#include <boost/geometry/core/access.hpp>
#include <boost/geometry/core/closure.hpp>
#include <boost/geometry/core/exterior_ring.hpp>
#include <boost/geometry/core/point_order.hpp>
+#include <boost/geometry/core/static_assert.hpp>
#include <boost/geometry/core/tags.hpp>
#include <boost/geometry/geometries/concepts/check.hpp>
-#include <boost/geometry/util/math.hpp>
+#include <boost/geometry/geometries/segment.hpp>
#include <boost/geometry/policies/robustness/no_rescale_policy.hpp>
#include <boost/geometry/policies/robustness/robust_point_type.hpp>
+#include <boost/geometry/util/math.hpp>
+#include <boost/geometry/util/normalize_spheroidal_coordinates.hpp>
+#include <boost/geometry/util/sequence.hpp>
#include <boost/geometry/views/closeable_view.hpp>
#include <boost/geometry/views/reversible_view.hpp>
-#include <boost/geometry/geometries/segment.hpp>
-
-#include <boost/geometry/algorithms/detail/expand_by_epsilon.hpp>
-#include <boost/geometry/algorithms/detail/buffer/buffer_box.hpp>
-#include <boost/geometry/strategies/envelope.hpp>
-#include <boost/geometry/strategies/expand.hpp>
+// TEMP
+#include <boost/geometry/strategy/envelope.hpp>
+#include <boost/geometry/strategy/expand.hpp>
namespace boost { namespace geometry
{
>
struct get_direction_loop
{
- typedef typename boost::mpl::at_c<DimensionVector, Index>::type dimension;
+ typedef typename util::sequence_element<Index, DimensionVector>::type dimension;
template <typename Segment>
static inline void apply(Segment const& seg,
>
struct get_direction_loop<Point, DimensionVector, 0, Count, spherical_tag>
{
- typedef typename boost::mpl::at_c<DimensionVector, 0>::type dimension;
+ typedef typename util::sequence_element<0, DimensionVector>::type dimension;
template <typename Segment>
static inline void apply(Segment const& seg,
struct sectionalize_part
{
static const std::size_t dimension_count
- = boost::mpl::size<DimensionVector>::value;
+ = util::sequence_size<DimensionVector>::value;
template
<
typedef typename boost::range_value<Sections>::type section_type;
BOOST_STATIC_ASSERT
(
- (static_cast<std::size_t>(section_type::dimension_count)
- == static_cast<std::size_t>(boost::mpl::size<DimensionVector>::value))
+ section_type::dimension_count
+ == util::sequence_size<DimensionVector>::value
);
typedef typename geometry::robust_point_type
static inline void apply(Box & box)
{
typedef typename coordinate_type<Box>::type coord_t;
- static const coord_t eps = boost::is_same<coord_t, float>::value
+ static const coord_t eps = std::is_same<coord_t, float>::value
? coord_t(1e-6)
: coord_t(1e-12);
detail::expand_by_epsilon(box, eps);
>
struct sectionalize
{
- BOOST_MPL_ASSERT_MSG
- (
- false, NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
- , (types<Geometry>)
- );
+ BOOST_GEOMETRY_STATIC_ASSERT_FALSE(
+ "Not or not yet implemented for this Geometry type.",
+ Tag, Geometry);
};
template
int source_index = 0,
std::size_t max_count = 10)
{
- BOOST_STATIC_ASSERT((! boost::is_fundamental<EnvelopeStrategy>::value));
+ BOOST_STATIC_ASSERT((! std::is_fundamental<EnvelopeStrategy>::value));
concepts::check<Geometry const>();
>::type
>::type ctype2;
- BOOST_MPL_ASSERT((boost::is_same<ctype1, ctype2>));
+ BOOST_STATIC_ASSERT((std::is_same<ctype1, ctype2>::value));
sections.clear();
typedef typename strategy::expand::services::default_strategy
<
- typename boost::mpl::if_c
+ std::conditional_t
<
- boost::is_same<typename tag<Geometry>::type, box_tag>::value,
+ std::is_same<typename tag<Geometry>::type, box_tag>::value,
box_tag,
segment_tag
- >::type,
+ >,
typename cs_tag<Geometry>::type
>::type expand_strategy_type;