Skip to content

Commit d2dc3b1

Browse files
committed
Merge branch 'develop' into bg-prepare
2 parents f99ab49 + 928603f commit d2dc3b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+967
-186
lines changed

.github/workflows/documentation.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# GitHub Actions Workflow for Boost.Geometry to build documentation
33
#
44
# Copyright (c) 2020 Mateusz Loskot <mateusz@loskot.net>
5+
# Copyright (c) 2020 Adam Wulkiewicz, Lodz, Poland
56
#
67
# Use, modification and distribution is subject to the Boost Software License,
78
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -31,12 +32,12 @@ jobs:
3132
id: setenv
3233
run: |
3334
if [[ "$GITHUB_REF" == *master ]]; then
34-
echo "::set-env name=BOOST_BRANCH::master"
35+
echo "BOOST_BRANCH=master" >> $GITHUB_ENV
3536
else
36-
echo "::set-env name=BOOST_BRANCH::develop"
37+
echo "BOOST_BRANCH=develop" >> $GITHUB_ENV
3738
fi
38-
echo "::set-env name=BOOST_SELF::$(basename $GITHUB_WORKSPACE)"
39-
echo "::set-env name=BOOST_ROOT::$GITHUB_WORKSPACE/boost-root"
39+
echo "BOOST_SELF=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_ENV
40+
echo "BOOST_ROOT=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_ENV
4041
echo "::set-output name=boost_self::$(basename $GITHUB_WORKSPACE)"
4142
echo "::set-output name=boost_root::$GITHUB_WORKSPACE/boost-root"
4243

.github/workflows/minimal-clang.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# GitHub Actions Workflow for Boost.Geometry to build minimal tests with Clang
33
#
44
# Copyright (c) 2020 Mateusz Loskot <mateusz@loskot.net>
5+
# Copyright (c) 2020 Adam Wulkiewicz, Lodz, Poland
56
#
67
# Use, modification and distribution is subject to the Boost Software License,
78
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -61,12 +62,12 @@ jobs:
6162
id: setenv
6263
run: |
6364
if [[ "$GITHUB_REF" == *master ]]; then
64-
echo "::set-env name=BOOST_BRANCH::master"
65+
echo "BOOST_BRANCH=master" >> $GITHUB_ENV
6566
else
66-
echo "::set-env name=BOOST_BRANCH::develop"
67+
echo "BOOST_BRANCH=develop" >> $GITHUB_ENV
6768
fi
68-
echo "::set-env name=BOOST_SELF::$(basename $GITHUB_WORKSPACE)"
69-
echo "::set-env name=BOOST_ROOT::$GITHUB_WORKSPACE/boost-root"
69+
echo "BOOST_SELF=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_ENV
70+
echo "BOOST_ROOT=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_ENV
7071
echo "::set-output name=boost_self::$(basename $GITHUB_WORKSPACE)"
7172
echo "::set-output name=boost_root::$GITHUB_WORKSPACE/boost-root"
7273

.github/workflows/minimal-gcc.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# GitHub Actions Workflow for Boost.Geometry to build minimal tests with GCC
33
#
44
# Copyright (c) 2020 Mateusz Loskot <mateusz@loskot.net>
5+
# Copyright (c) 2020 Adam Wulkiewicz, Lodz, Poland
56
#
67
# Use, modification and distribution is subject to the Boost Software License,
78
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -49,12 +50,12 @@ jobs:
4950
id: setenv
5051
run: |
5152
if [[ "$GITHUB_REF" == *master ]]; then
52-
echo "::set-env name=BOOST_BRANCH::master"
53+
echo "BOOST_BRANCH=master" >> $GITHUB_ENV
5354
else
54-
echo "::set-env name=BOOST_BRANCH::develop"
55+
echo "BOOST_BRANCH=develop" >> $GITHUB_ENV
5556
fi
56-
echo "::set-env name=BOOST_SELF::$(basename $GITHUB_WORKSPACE)"
57-
echo "::set-env name=BOOST_ROOT::$GITHUB_WORKSPACE/boost-root"
57+
echo "BOOST_SELF=$(basename $GITHUB_WORKSPACE)" >> $GITHUB_ENV
58+
echo "BOOST_ROOT=$GITHUB_WORKSPACE/boost-root" >> $GITHUB_ENV
5859
echo "::set-output name=boost_self::$(basename $GITHUB_WORKSPACE)"
5960
echo "::set-output name=boost_root::$GITHUB_WORKSPACE/boost-root"
6061

.github/workflows/minimal-msvc.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# GitHub Actions Workflow for Boost.Geometry to build minimal tests with MSVC
33
#
44
# Copyright (c) 2020 Mateusz Loskot <mateusz@loskot.net>
5+
# Copyright (c) 2020 Adam Wulkiewicz, Lodz, Poland
56
#
67
# Use, modification and distribution is subject to the Boost Software License,
78
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -34,13 +35,13 @@ jobs:
3435
id: setenv
3536
shell: pwsh
3637
run: |
37-
if ("$GITHUB_REF" -contains "master") {
38-
echo "::set-env name=BOOST_BRANCH::master"
38+
if ("$env:GITHUB_REF" -contains "master") {
39+
echo "BOOST_BRANCH=master" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
3940
} else {
40-
echo "::set-env name=BOOST_BRANCH::develop"
41+
echo "BOOST_BRANCH=develop" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4142
}
42-
echo "::set-env name=BOOST_SELF::$((Get-Item $env:GITHUB_WORKSPACE).BaseName)"
43-
echo "::set-env name=BOOST_ROOT::$env:GITHUB_WORKSPACE\boost-root"
43+
echo "BOOST_SELF=$((Get-Item $env:GITHUB_WORKSPACE).BaseName)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
44+
echo "BOOST_ROOT=$env:GITHUB_WORKSPACE\boost-root" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4445
echo "::set-output name=boost_self::$((Get-Item $env:GITHUB_WORKSPACE).BaseName)"
4546
echo "::set-output name=boost_root::$env:GITHUB_WORKSPACE\boost-root"
4647

include/boost/geometry/algorithms/area_result.hpp

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include <boost/geometry/util/select_most_precise.hpp>
2828
#include <boost/geometry/util/sequence.hpp>
29+
#include <boost/geometry/util/type_traits.hpp>
2930

3031
#include <boost/variant/variant_fwd.hpp>
3132

@@ -51,17 +52,18 @@ struct area_result
5152
typedef typename strategy_type::template result_type<Geometry>::type type;
5253
};
5354

55+
template <typename Geometry, typename Strategy>
56+
struct area_result<Geometry, Strategy, false>
57+
{
58+
typedef typename Strategy::template result_type<Geometry>::type type;
59+
};
60+
61+
5462
template
5563
<
5664
typename Geometry,
57-
typename Strategy
65+
bool IsGeometry = util::is_geometry<Geometry>::value
5866
>
59-
struct area_result<Geometry, Strategy, false>
60-
: Strategy::template result_type<Geometry>
61-
{};
62-
63-
64-
template <typename Geometry>
6567
struct default_area_result
6668
: area_result
6769
<
@@ -73,15 +75,37 @@ struct default_area_result
7375
>
7476
{};
7577

78+
// Workaround for VS2015
79+
#if defined(_MSC_VER) && (_MSC_VER < 1910)
80+
template
81+
<
82+
typename Geometry,
83+
bool IsGeometry = util::is_geometry<Geometry>::value
84+
>
85+
struct coordinate_type
86+
: geometry::coordinate_type<Geometry>
87+
{};
88+
template <typename Geometry>
89+
struct coordinate_type<Geometry, false>
90+
{
91+
typedef int type;
92+
};
93+
template <typename Geometry>
94+
struct default_area_result<Geometry, false>
95+
{
96+
typedef int type;
97+
};
98+
#endif
99+
76100
template <typename Curr, typename Next>
77101
struct more_precise_coordinate_type
78102
: std::is_same
79103
<
80-
typename geometry::coordinate_type<Curr>::type,
104+
typename coordinate_type<Curr>::type,
81105
typename geometry::select_most_precise
82106
<
83-
typename geometry::coordinate_type<Curr>::type,
84-
typename geometry::coordinate_type<Next>::type
107+
typename coordinate_type<Curr>::type,
108+
typename coordinate_type<Next>::type
85109
>::type
86110
>
87111
{};
@@ -119,14 +143,14 @@ struct area_result
119143
: detail::area::area_result<Geometry, Strategy>
120144
{};
121145

122-
template <typename ...Ts, typename Strategy>
123-
struct area_result<boost::variant<Ts...>, Strategy>
146+
template <BOOST_VARIANT_ENUM_PARAMS(typename T), typename Strategy>
147+
struct area_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, Strategy>
124148
: geometry::area_result
125149
<
126150
typename util::select_pack_element
127151
<
128152
detail::area::more_precise_coordinate_type,
129-
Ts...
153+
BOOST_VARIANT_ENUM_PARAMS(T)
130154
>::type,
131155
Strategy
132156
>
@@ -137,16 +161,15 @@ struct area_result<Geometry, default_strategy>
137161
: detail::area::default_area_result<Geometry>
138162
{};
139163

140-
template <typename ...Ts>
141-
struct area_result<boost::variant<Ts...>, default_strategy>
142-
: geometry::area_result
164+
template <BOOST_VARIANT_ENUM_PARAMS(typename T)>
165+
struct area_result<boost::variant<BOOST_VARIANT_ENUM_PARAMS(T)>, default_strategy>
166+
: detail::area::default_area_result
143167
<
144168
typename util::select_pack_element
145169
<
146170
detail::area::more_precise_default_area_result,
147-
Ts...
148-
>::type,
149-
default_strategy
171+
BOOST_VARIANT_ENUM_PARAMS(T)
172+
>::type
150173
>
151174
{};
152175

include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class piece_turn_visitor
266266

267267
typedef detail::overlay::get_turn_info
268268
<
269-
detail::overlay::assign_null_policy
269+
detail::overlay::assign_policy_only_start_turns
270270
> turn_policy;
271271

272272
turn_policy::apply(unique_sub_range1, unique_sub_range2,

include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ struct assign_disjoint_policy
7979
static bool const include_no_turn = true;
8080
static bool const include_degenerate = true;
8181
static bool const include_opposite = true;
82+
static bool const include_start_turn = false;
8283
};
8384

8485

include/boost/geometry/algorithms/detail/envelope/segment.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ struct envelope_segment_call_strategy<Strategy, false>
5757
{
5858
template <typename Point, typename Segment, typename Box>
5959
static inline void apply(Point const& p1, Point const& p2,
60-
Segment const& segment, Box& mbr,
60+
Segment const&, Box& mbr,
6161
Strategy const& strategy)
6262
{
6363
strategy.apply(p1, p2, mbr);

include/boost/geometry/algorithms/detail/overlay/debug_turn_info.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ inline char method_char(detail::overlay::method_type const& method)
2828
case method_touch_interior : return 'm';
2929
case method_collinear : return 'c';
3030
case method_equal : return 'e';
31+
case method_start : return 's';
3132
case method_error : return '!';
3233
default : return '?';
3334
}

include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ inline void enrich_intersection_points(Turns& turns,
491491
{
492492
detail::overlay::discard_closed_turns
493493
<
494-
OverlayType,
495-
target_operation
494+
OverlayType,
495+
target_operation
496496
>::apply(turns, clusters, geometry1, geometry2,
497497
strategy);
498498
detail::overlay::discard_open_turns

0 commit comments

Comments
 (0)