update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -1,19 +1,20 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2014, Oracle and/or its affiliates.
// Copyright (c) 2014-2020, 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
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_PRINT_TURNS_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_PRINT_TURNS_HPP
#include <algorithm>
#include <iostream>
#include <boost/range.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/geometry/algorithms/detail/overlay/traversal_info.hpp>
#include <boost/geometry/algorithms/detail/overlay/turn_info.hpp>

View File

@@ -1,18 +1,19 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Copyright (c) 2014, Oracle and/or its affiliates.
// Copyright (c) 2014-2022, 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
// Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
#ifndef BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_REMOVE_DUPLICATE_TURNS_HPP
#define BOOST_GEOMETRY_ALGORITHMS_DETAIL_TURNS_REMOVE_DUPLICATE_TURNS_HPP
#include <algorithm>
#include <boost/geometry/algorithms/equals.hpp>
#include <boost/geometry/algorithms/detail/equals/point_point.hpp>
namespace boost { namespace geometry
{
@@ -23,33 +24,27 @@ namespace detail { namespace turns
template <typename Turns, bool Enable>
struct remove_duplicate_turns
{
static inline void apply(Turns&) {}
template <typename Strategy>
static inline void apply(Turns const&, Strategy const&) {}
};
template <typename Turns>
class remove_duplicate_turns<Turns, true>
struct remove_duplicate_turns<Turns, true>
{
private:
struct TurnEqualsTo
template <typename Strategy>
static inline void apply(Turns& turns, Strategy const& strategy)
{
template <typename Turn>
bool operator()(Turn const& t1, Turn const& t2) const
{
return geometry::equals(t1.point, t2.point)
&& t1.operations[0].seg_id == t2.operations[0].seg_id
&& t1.operations[1].seg_id == t2.operations[1].seg_id;
}
};
public:
static inline void apply(Turns& turns)
{
turns.erase( std::unique(turns.begin(), turns.end(),
TurnEqualsTo()),
turns.end()
);
turns.erase(
std::unique(turns.begin(), turns.end(),
[&](auto const& t1, auto const& t2)
{
return detail::equals::equals_point_point(t1.point, t2.point, strategy)
&& t1.operations[0].seg_id == t2.operations[0].seg_id
&& t1.operations[1].seg_id == t2.operations[1].seg_id;
}),
turns.end());
}
};