Skip to content

Commit cda019d

Browse files
committed
Merge branch 'develop'
2 parents c5ebb03 + eeeb75a commit cda019d

File tree

438 files changed

+3619
-2697
lines changed

Some content is hidden

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

438 files changed

+3619
-2697
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Boost.Geometry, part of collection of the [Boost C++ Libraries](http://github.co
1212

1313
Branch | Build | Coverage | Regression | Documentation
1414
------------|---------------|----------------|------------|--------------
15-
**develop** | [![circleci](https://circleci.com/gh/boostorg/geometry/tree/develop.svg?style=shield)](https://circleci.com/gh/boostorg/geometry/tree/develop) <br> [![minimal](https://github.com/boostorg/geometry/workflows/minimal/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:minimal) | [![coveralls](https://coveralls.io/repos/github/boostorg/geometry/badge.svg?branch=develop)](https://coveralls.io/github/boostorg/geometry?branch=develop) <br> [![codecov](https://codecov.io/gh/boostorg/geometry/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/geometry/branch/develop) | [![geometry](https://img.shields.io/badge/-geometry-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry.html) [![index](https://img.shields.io/badge/-index-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry-index.html) [![extensions](https://img.shields.io/badge/-extensions-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry-extensions.html) | [![documentation](https://github.com/boostorg/geometry/workflows/documentation/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:documentation)
16-
**master** | [![circleci](https://circleci.com/gh/boostorg/geometry/tree/master.svg?style=shield)](https://circleci.com/gh/boostorg/geometry/tree/master) <br> [![minimal](https://github.com/boostorg/geometry/workflows/minimal/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:minimal) | [![coveralls](https://coveralls.io/repos/github/boostorg/geometry/badge.svg?branch=master)](https://coveralls.io/github/boostorg/geometry?branch=master) <br> [![codecov](https://codecov.io/gh/boostorg/geometry/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/geometry/branch/master) | [![geometry](https://img.shields.io/badge/-geometry-4480cc.png)](http://www.boost.org/development/tests/master/developer/geometry.html) [![index](https://img.shields.io/badge/-index-4480cc.png)](http://www.boost.org/development/tests/master/developer/geometry-index.html) | [![documentation](https://github.com/boostorg/geometry/workflows/documentation/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:documentation)
15+
**develop** | [![circleci](https://circleci.com/gh/boostorg/geometry/tree/develop.svg?style=shield)](https://circleci.com/gh/boostorg/geometry/tree/develop) <br> [![minimal](https://github.com/boostorg/geometry/actions/workflows/minimal.yml/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:minimal) | [![coveralls](https://coveralls.io/repos/github/boostorg/geometry/badge.svg?branch=develop)](https://coveralls.io/github/boostorg/geometry?branch=develop) <br> [![codecov](https://codecov.io/gh/boostorg/geometry/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/geometry/branch/develop) | [![geometry](https://img.shields.io/badge/-geometry-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry.html) [![index](https://img.shields.io/badge/-index-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry-index.html) [![extensions](https://img.shields.io/badge/-extensions-4480cc.png)](http://www.boost.org/development/tests/develop/developer/geometry-extensions.html) | [![documentation](https://github.com/boostorg/geometry/actions/workflows/documentation.yml/badge.svg?branch=develop)](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:documentation)
16+
**master** | [![circleci](https://circleci.com/gh/boostorg/geometry/tree/master.svg?style=shield)](https://circleci.com/gh/boostorg/geometry/tree/master) <br> [![minimal](https://github.com/boostorg/geometry/actions/workflows/minimal.yml/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:minimal) | [![coveralls](https://coveralls.io/repos/github/boostorg/geometry/badge.svg?branch=master)](https://coveralls.io/github/boostorg/geometry?branch=master) <br> [![codecov](https://codecov.io/gh/boostorg/geometry/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/geometry/branch/master) | [![geometry](https://img.shields.io/badge/-geometry-4480cc.png)](http://www.boost.org/development/tests/master/developer/geometry.html) [![index](https://img.shields.io/badge/-index-4480cc.png)](http://www.boost.org/development/tests/master/developer/geometry-index.html) | [![documentation](https://github.com/boostorg/geometry/actions/workflows/documentation.yml/badge.svg?branch=master)](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:documentation)
1717

1818
### Directories
1919

include/boost/geometry/algorithms/area_result.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ template <typename Curr, typename Next>
7272
struct more_precise_coordinate_type
7373
: std::is_same
7474
<
75-
typename geometry::coordinate_type<Curr>::type,
75+
geometry::coordinate_type_t<Curr>,
7676
typename geometry::select_most_precise
7777
<
78-
typename geometry::coordinate_type<Curr>::type,
79-
typename geometry::coordinate_type<Next>::type
78+
geometry::coordinate_type_t<Curr>,
79+
geometry::coordinate_type_t<Next>
8080
>::type
8181
>
8282
{};

include/boost/geometry/algorithms/azimuth.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ namespace dispatch
4646
template
4747
<
4848
typename Geometry1, typename Geometry2,
49-
typename Tag1 = typename tag<Geometry1>::type,
50-
typename Tag2 = typename tag<Geometry2>::type
49+
typename Tag1 = tag_t<Geometry1>,
50+
typename Tag2 = tag_t<Geometry2>
5151
>
5252
struct azimuth : not_implemented<Tag1, Tag2>
5353
{};
@@ -58,19 +58,20 @@ struct azimuth<Point1, Point2, point_tag, point_tag>
5858
template <typename Strategy>
5959
static auto apply(Point1 const& p1, Point2 const& p2, Strategy const& strategy)
6060
{
61-
typedef typename decltype(strategy.azimuth())::template result_type
61+
auto azimuth_strategy = strategy.azimuth();
62+
using calc_t = typename decltype(azimuth_strategy)::template result_type
6263
<
63-
typename coordinate_type<Point1>::type,
64-
typename coordinate_type<Point2>::type
65-
>::type calc_t;
64+
coordinate_type_t<Point1>,
65+
coordinate_type_t<Point2>
66+
>::type;
6667

6768
calc_t result = 0;
6869
calc_t const x1 = geometry::get_as_radian<0>(p1);
6970
calc_t const y1 = geometry::get_as_radian<1>(p1);
7071
calc_t const x2 = geometry::get_as_radian<0>(p2);
7172
calc_t const y2 = geometry::get_as_radian<1>(p2);
7273

73-
strategy.azimuth().apply(x1, y1, x2, y2, result);
74+
azimuth_strategy.apply(x1, y1, x2, y2, result);
7475

7576
// NOTE: It is not clear which units we should use for the result.
7677
// For now radians are always returned but a user could expect

include/boost/geometry/algorithms/convert.hpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,11 +381,9 @@ struct convert<Box, Polygon, box_tag, polygon_tag, 2, false>
381381
{
382382
static inline void apply(Box const& box, Polygon& polygon)
383383
{
384-
typedef typename ring_type<Polygon>::type ring_type;
385-
386384
convert
387385
<
388-
Box, ring_type,
386+
Box, ring_type_t<Polygon>,
389387
box_tag, ring_tag,
390388
2, false
391389
>::apply(box, exterior_ring(polygon));
@@ -415,10 +413,9 @@ struct convert<Ring, Polygon, ring_tag, polygon_tag, DimensionCount, false>
415413
{
416414
static inline void apply(Ring const& ring, Polygon& polygon)
417415
{
418-
typedef typename ring_type<Polygon>::type ring_type;
419416
convert
420417
<
421-
Ring, ring_type,
418+
Ring, ring_type_t<Polygon>,
422419
ring_tag, ring_tag,
423420
DimensionCount, false
424421
>::apply(ring, exterior_ring(polygon));
@@ -431,11 +428,9 @@ struct convert<Polygon, Ring, polygon_tag, ring_tag, DimensionCount, false>
431428
{
432429
static inline void apply(Polygon const& polygon, Ring& ring)
433430
{
434-
typedef typename ring_type<Polygon>::type ring_type;
435-
436431
convert
437432
<
438-
ring_type, Ring,
433+
ring_type_t<Polygon>, Ring,
439434
ring_tag, ring_tag,
440435
DimensionCount, false
441436
>::apply(exterior_ring(polygon), ring);

include/boost/geometry/algorithms/crosses.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ template
4848
<
4949
typename Geometry1,
5050
typename Geometry2,
51-
typename Tag1 = typename tag<Geometry1>::type,
52-
typename Tag2 = typename tag<Geometry2>::type
51+
typename Tag1 = tag_t<Geometry1>,
52+
typename Tag2 = tag_t<Geometry2>
5353
>
5454
struct crosses
5555
: detail::relate::relate_impl
@@ -215,8 +215,8 @@ namespace resolve_dynamic
215215
template
216216
<
217217
typename Geometry1, typename Geometry2,
218-
typename Tag1 = typename geometry::tag<Geometry1>::type,
219-
typename Tag2 = typename geometry::tag<Geometry2>::type
218+
typename Tag1 = geometry::tag_t<Geometry1>,
219+
typename Tag2 = geometry::tag_t<Geometry2>
220220
>
221221
struct crosses
222222
{

include/boost/geometry/algorithms/densify.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ template
170170
<
171171
typename Geometry,
172172
typename GeometryOut,
173-
typename Tag1 = typename tag<Geometry>::type,
174-
typename Tag2 = typename tag<GeometryOut>::type
173+
typename Tag1 = tag_t<Geometry>,
174+
typename Tag2 = tag_t<GeometryOut>
175175
>
176176
struct densify
177177
: not_implemented<Tag1, Tag2>
@@ -360,7 +360,7 @@ struct densify<default_strategy, false>
360360

361361
namespace resolve_dynamic {
362362

363-
template <typename Geometry, typename Tag = typename tag<Geometry>::type>
363+
template <typename Geometry, typename Tag = tag_t<Geometry>>
364364
struct densify
365365
{
366366
template <typename Distance, typename Strategy>

include/boost/geometry/algorithms/detail/assign_indexed_point.hpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ inline void assign_point_to_index(Point const& point, Geometry& geometry)
5959
detail::for_each_dimension<Geometry>([&](auto dimension)
6060
{
6161
geometry::set<Index, dimension>(geometry,
62-
util::numeric_cast
63-
<
64-
typename coordinate_type<Geometry>::type
65-
>(geometry::get<dimension>(point)));
62+
util::numeric_cast<coordinate_type_t<Geometry>>(geometry::get<dimension>(point)));
6663
});
6764
}
6865

@@ -93,7 +90,7 @@ inline void assign_point_from_index(Geometry const& geometry, Point& point)
9390
geometry::set<dimension>(point,
9491
util::numeric_cast
9592
<
96-
typename coordinate_type<Point>::type
93+
coordinate_type_t<Point>
9794
>(geometry::get<Index, dimension>(geometry)));
9895
});
9996
}

include/boost/geometry/algorithms/detail/assign_values.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct assign_zero_point
5454
template <typename Point>
5555
static inline void apply(Point& point)
5656
{
57-
typedef typename coordinate_type<Point>::type coordinate_type;
57+
using coordinate_type = coordinate_type_t<Point>;
5858

5959
coordinate_type const zero = 0;
6060
detail::for_each_dimension<Point>([&](auto dimension)
@@ -71,7 +71,7 @@ struct assign_inverse_box_or_segment
7171
template <typename BoxOrSegment>
7272
static inline void apply(BoxOrSegment& geometry)
7373
{
74-
typedef typename coordinate_type<BoxOrSegment>::type coordinate_type;
74+
using coordinate_type = coordinate_type_t<BoxOrSegment>;
7575

7676
coordinate_type const highest = util::bounds<coordinate_type>::highest();
7777
coordinate_type const lowest = util::bounds<coordinate_type>::lowest();
@@ -90,7 +90,7 @@ struct assign_zero_box_or_segment
9090
template <typename BoxOrSegment>
9191
static inline void apply(BoxOrSegment& geometry)
9292
{
93-
typedef typename coordinate_type<BoxOrSegment>::type coordinate_type;
93+
using coordinate_type = coordinate_type_t<BoxOrSegment>;
9494

9595
coordinate_type const zero = 0;
9696
detail::for_each_dimension<BoxOrSegment>([&](auto dimension)
@@ -114,7 +114,7 @@ inline void assign_box_2d_corner(Box const& box, Point& point)
114114
assert_dimension<Point, 2>();
115115

116116
// Copy coordinates
117-
typedef typename coordinate_type<Point>::type coordinate_type;
117+
using coordinate_type = coordinate_type_t<Point>;
118118

119119
geometry::set<0>(point, util::numeric_cast<coordinate_type>(get<Corner1, 0>(box)));
120120
geometry::set<1>(point, util::numeric_cast<coordinate_type>(get<Corner2, 1>(box)));
@@ -125,7 +125,7 @@ inline void assign_box_2d_corner(Box const& box, Point& point)
125125
template <typename Geometry>
126126
struct assign_2d_box_or_segment
127127
{
128-
typedef typename coordinate_type<Geometry>::type coordinate_type;
128+
using coordinate_type = coordinate_type_t<Geometry>;
129129

130130
// Here we assign 4 coordinates to a box of segment
131131
// -> Most logical is: x1,y1,x2,y2
@@ -161,7 +161,7 @@ struct assign
161161
template <typename Point>
162162
struct assign<point_tag, Point, 2>
163163
{
164-
typedef typename coordinate_type<Point>::type coordinate_type;
164+
using coordinate_type = coordinate_type_t<Point>;
165165

166166
template <typename T>
167167
static inline void apply(Point& point, T const& c1, T const& c2)
@@ -174,7 +174,7 @@ struct assign<point_tag, Point, 2>
174174
template <typename Point>
175175
struct assign<point_tag, Point, 3>
176176
{
177-
typedef typename coordinate_type<Point>::type coordinate_type;
177+
using coordinate_type = coordinate_type_t<Point>;
178178

179179
template <typename T>
180180
static inline void apply(Point& point, T const& c1, T const& c2, T const& c3)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace detail { namespace buffer
2626
template <typename BoxIn, typename BoxOut, typename T, std::size_t C, std::size_t D, std::size_t N>
2727
struct box_loop
2828
{
29-
typedef typename coordinate_type<BoxOut>::type coordinate_type;
29+
using coordinate_type = coordinate_type_t<BoxOut>;
3030

3131
static inline void apply(BoxIn const& box_in, T const& distance, BoxOut& box_out)
3232
{

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ struct buffer_range
221221
{
222222
boost::ignore_unused(segment_strategy);
223223

224-
typedef typename std::iterator_traits
224+
using point_type = typename std::iterator_traits
225225
<
226226
Iterator
227-
>::value_type point_type;
227+
>::value_type;
228228

229229
point_type second_point, penultimate_point, ultimate_point; // last two points from begin/end
230230

@@ -469,7 +469,7 @@ struct buffer_inserter_ring
469469
{
470470
output_point_type first_p1, first_p2, last_p1, last_p2;
471471

472-
typedef detail::buffer::buffer_range<RingOutput> buffer_range;
472+
using buffer_range = detail::buffer::buffer_range<RingOutput>;
473473

474474
geometry::strategy::buffer::result_code result
475475
= buffer_range::iterate(collection, begin, end,
@@ -747,11 +747,10 @@ template
747747
struct buffer_inserter<polygon_tag, PolygonInput, PolygonOutput>
748748
{
749749
private:
750-
typedef typename ring_type<PolygonInput>::type input_ring_type;
751-
typedef typename ring_type<PolygonOutput>::type output_ring_type;
752-
753-
typedef buffer_inserter_ring<input_ring_type, output_ring_type> policy;
750+
using input_ring_type = ring_type_t<PolygonInput>;
751+
using output_ring_type = ring_type_t<PolygonOutput>;
754752

753+
using policy = buffer_inserter_ring<input_ring_type, output_ring_type>;
755754

756755
template
757756
<
@@ -873,12 +872,9 @@ struct buffer_inserter<multi_tag, Multi, PolygonOutput>
873872
PolygonOutput,
874873
dispatch::buffer_inserter
875874
<
876-
typename single_tag_of
877-
<
878-
typename tag<Multi>::type
879-
>::type,
875+
typename single_tag_of<tag_t<Multi>>::type,
880876
typename boost::range_value<Multi const>::type,
881-
typename geometry::ring_type<PolygonOutput>::type
877+
geometry::ring_type_t<PolygonOutput>
882878
>
883879
>
884880
{};
@@ -918,7 +914,7 @@ inline void buffer_inserter(GeometryInput const& geometry_input, OutputIterator
918914

919915
using collection_type = detail::buffer::buffered_piece_collection
920916
<
921-
typename geometry::ring_type<GeometryOutput>::type,
917+
geometry::ring_type_t<GeometryOutput>,
922918
Strategies,
923919
DistanceStrategy
924920
>;

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

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace detail { namespace buffer
3939
class backtrack_for_buffer
4040
{
4141
public :
42-
typedef detail::overlay::backtrack_state state_type;
42+
using state_type = detail::overlay::backtrack_state;
4343

4444
template
4545
<
@@ -87,20 +87,6 @@ g_backtrack_warning_count++;
8787
struct buffer_overlay_visitor
8888
{
8989
public :
90-
void print(char const* /*header*/)
91-
{
92-
}
93-
94-
template <typename Turns>
95-
void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/)
96-
{
97-
}
98-
99-
template <typename Turns>
100-
void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/, int /*op_index*/)
101-
{
102-
}
103-
10490
template <typename Turns>
10591
void visit_turns(int , Turns const& ) {}
10692

@@ -148,7 +134,7 @@ struct buffer_turn_info
148134
buffer_turn_operation<Point, SegmentRatio>
149135
>
150136
{
151-
typedef Point point_type;
137+
using point_type = Point;
152138

153139
std::size_t turn_index;
154140

@@ -170,26 +156,6 @@ struct buffer_turn_info
170156
{}
171157
};
172158

173-
struct buffer_less
174-
{
175-
template <typename Indexed>
176-
inline bool operator()(Indexed const& left, Indexed const& right) const
177-
{
178-
if (! (left.subject->seg_id == right.subject->seg_id))
179-
{
180-
return left.subject->seg_id < right.subject->seg_id;
181-
}
182-
183-
// Both left and right are located on the SAME segment.
184-
if (! (left.subject->fraction == right.subject->fraction))
185-
{
186-
return left.subject->fraction < right.subject->fraction;
187-
}
188-
189-
return left.turn_index < right.turn_index;
190-
}
191-
};
192-
193159
template <typename Strategy>
194160
struct piece_get_box
195161
{

0 commit comments

Comments
 (0)