Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vissarion committed Jul 4, 2023
2 parents 2ec9d65 + 592024e commit 18ed7c1
Show file tree
Hide file tree
Showing 506 changed files with 4,797 additions and 3,308 deletions.
1 change: 1 addition & 0 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
b2_cxxstd: 14,17,2a
version: "10"


steps:
- name: Set up environment
id: setenv
Expand Down
4 changes: 1 addition & 3 deletions doc/index/rtree/query.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,8 @@ may use `index::satisfies()` function like on the example below:
rt.query(index::intersects(box) && index::satisfies(is_red_o()),
std::back_inserter(result));

#ifndef BOOST_NO_CXX11_LAMBDAS
rt.query(index::intersects(box) && index::satisfies([](__value__ const& v) { return v.is_red(); }),
std::back_inserter(result));
#endif

`satisfies()` may be negated, e.g.:

Expand Down Expand Up @@ -239,7 +237,7 @@ The most basic way is creating a temporary container for Values and insert them

However there are other ways. One of these methods is mentioned in the "Creation and modification" section.
The insert iterator may be passed directly into the query.

RTree rt3;
rt1.query(bgi::intersects(Box(/*...*/))), bgi::inserter(rt3));

Expand Down
15 changes: 15 additions & 0 deletions doc/release_notes.qbk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@

[section:release_notes Release Notes]

[/=================]
[heading Boost 1.83]
[/=================]

[*Major improvements]

[*Improvements]

[*Solved issues]

* [@https://github.com/boostorg/geometry/issues/1100 1100] Fix for union
* [@https://github.com/boostorg/geometry/issues/1139 1139] Fix for different geometry types

[*Breaking changes]

[/=================]
[heading Boost 1.82]
[/=================]
Expand Down
3 changes: 3 additions & 0 deletions doc/src/examples/core/interior_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// QuickBook Example

// Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2023 Adam Wulkiewicz, Lodz, Poland.

// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
Expand All @@ -10,6 +11,8 @@
//[interior_type
//`Shows how to use the interior_type metafunction

#include <deque>
#include <list>
#include <iostream>
#include <typeinfo>

Expand Down
10 changes: 0 additions & 10 deletions doc/src/examples/geometries/adapted/std_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <boost/config.hpp>
#ifdef BOOST_NO_CXX11_HDR_ARRAY

int main()
{
return 0;
}

#else //this example needs C++11 std::array

//[std_array
//` Shows how to use a C++11 std::array using Boost.Geometry's distance, set and assign_values algorithms
Expand Down Expand Up @@ -49,8 +41,6 @@ int main()

//]

#endif //BOOST_NO_CXX11_HDR_ARRAY

//[std_array_output
/*`
Output:
Expand Down
5 changes: 0 additions & 5 deletions doc/src/examples/geometries/box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@ int main()

box_t box1; /*< Default-construct a box. >*/
box_t box2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning min and max corner point. >*/

#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX

box_t box3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/

#endif

bg::set<bg::min_corner, 0>(box1, 1.0); /*< Set a coordinate, generic. >*/
bg::set<bg::min_corner, 1>(box1, 2.0);
box1.max_corner().set<0>(3.0); /*< Set a coordinate, class-specific ([*Note]: prefer `bg::set()`). >*/
Expand Down
6 changes: 0 additions & 6 deletions doc/src/examples/geometries/linestring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,8 @@ int main()
typedef bg::model::linestring<point_t> linestring_t;

linestring_t ls1; /*< Default-construct a linestring. >*/

#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)

linestring_t ls2{{0.0, 0.0}, {1.0, 0.0}, {1.0, 2.0}}; /*< Construct a linestring containing three points, using C++11 unified initialization syntax. >*/

#endif

bg::append(ls1, point_t(0.0, 0.0)); /*< Append point. >*/
bg::append(ls1, point_t(1.0, 0.0));
bg::append(ls1, point_t(1.0, 2.0));
Expand Down
6 changes: 0 additions & 6 deletions doc/src/examples/geometries/multi_linestring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,9 @@ int main()
typedef bg::model::multi_linestring<linestring_t> mlinestring_t;

mlinestring_t mls1; /*< Default-construct a multi_linestring. >*/

#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)

mlinestring_t mls2{{{0.0, 0.0}, {0.0, 1.0}, {2.0, 1.0}},
{{1.0, 0.0}, {2.0, 0.0}}}; /*< Construct a multi_linestring containing two linestrings, using C++11 unified initialization syntax. >*/

#endif

mls1.resize(2); /*< Resize a multi_linestring, store two linestrings. >*/

bg::append(mls1[0], point_t(0.0, 0.0)); /*< Append point to the first linestring. >*/
Expand Down
6 changes: 0 additions & 6 deletions doc/src/examples/geometries/multi_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,8 @@ int main()
typedef bg::model::multi_point<point_t> mpoint_t;

mpoint_t mpt1; /*< Default-construct a multi_point. >*/

#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)

mpoint_t mpt2{{{0.0, 0.0}, {1.0, 1.0}, {2.0, 2.0}}}; /*< Construct a multi_point containing three points, using C++11 unified initialization syntax. >*/

#endif

bg::append(mpt1, point_t(0.0, 0.0)); /*< Append point to the multi_point. >*/
bg::append(mpt1, point_t(1.0, 1.0));
bg::append(mpt1, point_t(2.0, 2.0));
Expand Down
6 changes: 0 additions & 6 deletions doc/src/examples/geometries/multi_polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,10 @@ int main()
typedef bg::model::multi_polygon<polygon_t> mpolygon_t; /*< Clockwise, closed multi_polygon. >*/

mpolygon_t mpoly1; /*< Default-construct a multi_polygon. >*/

#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)

mpolygon_t mpoly2{{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}},
{{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}},
{{{5.0, 5.0}, {5.0, 6.0}, {6.0, 6.0}, {6.0, 5.0}, {5.0, 5.0}}}}; /*< Construct a multi_polygon containing two polygons, using C++11 unified initialization syntax. >*/

#endif

mpoly1.resize(2); /*< Resize a multi_polygon, store two polygons. >*/

bg::append(mpoly1[0].outer(), point_t(0.0, 0.0)); /*< Append point to the exterior ring of the first polygon. >*/
Expand Down
5 changes: 0 additions & 5 deletions doc/src/examples/geometries/polygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,9 @@ int main()

polygon_t poly1; /*< Default-construct a polygon. >*/

#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)

polygon_t polygon2{{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}},
{{1.0, 1.0}, {4.0, 1.0}, {4.0, 4.0}, {1.0, 4.0}, {1.0, 1.0}}}; /*< Construct a polygon containing an exterior and interior ring, using C++11 unified initialization syntax. >*/

#endif

bg::append(poly1.outer(), point_t(0.0, 0.0)); /*< Append point to the exterior ring. >*/
bg::append(poly1.outer(), point_t(0.0, 5.0));
bg::append(poly1.outer(), point_t(5.0, 5.0));
Expand Down
6 changes: 0 additions & 6 deletions doc/src/examples/geometries/ring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,8 @@ int main()
typedef bg::model::ring<point_t> ring_t; /*< Default parameters, clockwise, closed ring. >*/

ring_t ring1; /*< Default-construct a ring. >*/

#if !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) \
&& !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)

ring_t ring2{{0.0, 0.0}, {0.0, 5.0}, {5.0, 5.0}, {5.0, 0.0}, {0.0, 0.0}}; /*< Construct a ring containing four points plus one closing point, using C++11 unified initialization syntax. >*/

#endif

bg::append(ring1, point_t(0.0, 0.0)); /*< Append point. >*/
bg::append(ring1, point_t(0.0, 5.0));
bg::append(ring1, point_t(5.0, 5.0));
Expand Down
5 changes: 0 additions & 5 deletions doc/src/examples/geometries/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,8 @@ int main()

segment_t seg1; /*< Default-construct a segment. >*/
segment_t seg2(point_t(0.0, 0.0), point_t(5.0, 5.0)); /*< Construct, assigning the first and the second point. >*/

#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX

segment_t seg3{{0.0, 0.0}, {5.0, 5.0}}; /*< Construct, using C++11 unified initialization syntax. >*/

#endif

bg::set<0, 0>(seg1, 1.0); /*< Set a coordinate. >*/
bg::set<0, 1>(seg1, 2.0);
bg::set<1, 0>(seg1, 3.0);
Expand Down
6 changes: 2 additions & 4 deletions include/boost/geometry/algorithms/append.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,15 @@ struct to_polygon_point
signed_size_type ring_index, signed_size_type = 0)
{
using ring_type = typename ring_type<Polygon>::type;
using exterior_ring_type = typename ring_return_type<Polygon>::type;
using interior_ring_range_type = typename interior_return_type<Polygon>::type;

if (ring_index == -1)
{
exterior_ring_type ext_ring = exterior_ring(polygon);
auto&& ext_ring = exterior_ring(polygon);
to_range_point::apply<ring_type, Point>(ext_ring, point);
}
else if (ring_index < signed_size_type(num_interior_rings(polygon)))
{
interior_ring_range_type int_rings = interior_rings(polygon);
auto&& int_rings = interior_rings(polygon);
to_range_point::apply<ring_type, Point>(range::at(int_rings, ring_index), point);
}
}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/geometry/algorithms/area.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct ring_area
auto const end = boost::end(view);

strategy_type const strategy = strategies.area(ring);
typename strategy_type::template state<Ring> state;
typename strategy_type::template state<Ring> state;

for (auto previous = it++; it != end; ++previous, ++it)
{
Expand Down
34 changes: 17 additions & 17 deletions include/boost/geometry/algorithms/assign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ struct assign
concepts::check<Geometry1>();
concepts::check<Geometry2 const>();
concepts::check_concepts_and_equal_dimensions<Geometry1, Geometry2 const>();

static bool const same_point_order
= point_order<Geometry1>::value == point_order<Geometry2>::value;
BOOST_GEOMETRY_STATIC_ASSERT(
Expand All @@ -244,23 +244,23 @@ struct assign
same_closure,
"Assign is not supported for different closures.",
Geometry1, Geometry2);

dispatch::convert<Geometry2, Geometry1>::apply(geometry2, geometry1);
}
};


template <BOOST_VARIANT_ENUM_PARAMS(typename T), typename Geometry2>
struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Geometry2>
{
struct visitor: static_visitor<void>
{
Geometry2 const& m_geometry2;

visitor(Geometry2 const& geometry2)
: m_geometry2(geometry2)
{}

template <typename Geometry1>
result_type operator()(Geometry1& geometry1) const
{
Expand All @@ -272,27 +272,27 @@ struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Geometry2>
(geometry1, m_geometry2);
}
};

static inline void
apply(variant<BOOST_VARIANT_ENUM_PARAMS(T)>& geometry1,
Geometry2 const& geometry2)
{
return boost::apply_visitor(visitor(geometry2), geometry1);
}
};


template <typename Geometry1, BOOST_VARIANT_ENUM_PARAMS(typename T)>
struct assign<Geometry1, variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
{
struct visitor: static_visitor<void>
{
Geometry1& m_geometry1;

visitor(Geometry1 const& geometry1)
: m_geometry1(geometry1)
{}

template <typename Geometry2>
result_type operator()(Geometry2 const& geometry2) const
{
Expand All @@ -304,16 +304,16 @@ struct assign<Geometry1, variant<BOOST_VARIANT_ENUM_PARAMS(T)> >
(m_geometry1, geometry2);
}
};

static inline void
apply(Geometry1& geometry1,
variant<BOOST_VARIANT_ENUM_PARAMS(T)> const& geometry2)
{
return boost::apply_visitor(visitor(geometry1), geometry2);
}
};


template <BOOST_VARIANT_ENUM_PARAMS(typename T1), BOOST_VARIANT_ENUM_PARAMS(typename T2)>
struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T1)>, variant<BOOST_VARIANT_ENUM_PARAMS(T2)> >
{
Expand All @@ -332,17 +332,17 @@ struct assign<variant<BOOST_VARIANT_ENUM_PARAMS(T1)>, variant<BOOST_VARIANT_ENUM
(geometry1, geometry2);
}
};

static inline void
apply(variant<BOOST_VARIANT_ENUM_PARAMS(T1)>& geometry1,
variant<BOOST_VARIANT_ENUM_PARAMS(T2)> const& geometry2)
{
return boost::apply_visitor(visitor(), geometry1, geometry2);
}
};

} // namespace resolve_variant


/*!
\brief Assigns one geometry to another geometry
Expand Down
4 changes: 2 additions & 2 deletions include/boost/geometry/algorithms/azimuth.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace boost { namespace geometry
#ifndef DOXYGEN_NO_DETAIL
namespace detail
{

} // namespace detail
#endif // DOXYGEN_NO_DETAIL

Expand Down Expand Up @@ -183,7 +183,7 @@ inline auto azimuth(Point1 const& point1, Point2 const& point2)
{
concepts::check<Point1 const>();
concepts::check<Point2 const>();

return resolve_strategy::azimuth
<
default_strategy
Expand Down
Loading

0 comments on commit 18ed7c1

Please sign in to comment.