diff --git a/README.md b/README.md
index 9532cec9c..9c26e0e6c 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,8 @@ Boost.Geometry, part of collection of the [Boost C++ Libraries](http://github.co
Branch | Build | Coverage | Regression | Documentation
------------|---------------|----------------|------------|--------------
-**develop** | [](https://circleci.com/gh/boostorg/geometry/tree/develop)
[](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=develop)
[](https://codecov.io/gh/boostorg/geometry/branch/develop) | [](http://www.boost.org/development/tests/develop/developer/geometry.html) [](http://www.boost.org/development/tests/develop/developer/geometry-index.html) [](http://www.boost.org/development/tests/develop/developer/geometry-extensions.html) | [](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:documentation)
-**master** | [](https://circleci.com/gh/boostorg/geometry/tree/master)
[](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=master)
[](https://codecov.io/gh/boostorg/geometry/branch/master) | [](http://www.boost.org/development/tests/master/developer/geometry.html) [](http://www.boost.org/development/tests/master/developer/geometry-index.html) | [](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:documentation)
+**develop** | [](https://circleci.com/gh/boostorg/geometry/tree/develop)
[](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=develop)
[](https://codecov.io/gh/boostorg/geometry/branch/develop) | [](http://www.boost.org/development/tests/develop/developer/geometry.html) [](http://www.boost.org/development/tests/develop/developer/geometry-index.html) [](http://www.boost.org/development/tests/develop/developer/geometry-extensions.html) | [](https://github.com/boostorg/geometry/actions?query=branch:develop+workflow:documentation)
+**master** | [](https://circleci.com/gh/boostorg/geometry/tree/master)
[](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:minimal) | [](https://coveralls.io/github/boostorg/geometry?branch=master)
[](https://codecov.io/gh/boostorg/geometry/branch/master) | [](http://www.boost.org/development/tests/master/developer/geometry.html) [](http://www.boost.org/development/tests/master/developer/geometry-index.html) | [](https://github.com/boostorg/geometry/actions?query=branch:master+workflow:documentation)
### Directories
diff --git a/include/boost/geometry/algorithms/area_result.hpp b/include/boost/geometry/algorithms/area_result.hpp
index 73d9f52c5..1288c5264 100644
--- a/include/boost/geometry/algorithms/area_result.hpp
+++ b/include/boost/geometry/algorithms/area_result.hpp
@@ -72,11 +72,11 @@ template
struct more_precise_coordinate_type
: std::is_same
<
- typename geometry::coordinate_type::type,
+ geometry::coordinate_type_t,
typename geometry::select_most_precise
<
- typename geometry::coordinate_type::type,
- typename geometry::coordinate_type::type
+ geometry::coordinate_type_t,
+ geometry::coordinate_type_t
>::type
>
{};
diff --git a/include/boost/geometry/algorithms/azimuth.hpp b/include/boost/geometry/algorithms/azimuth.hpp
index 7056c512c..e7718e0b7 100644
--- a/include/boost/geometry/algorithms/azimuth.hpp
+++ b/include/boost/geometry/algorithms/azimuth.hpp
@@ -46,8 +46,8 @@ namespace dispatch
template
<
typename Geometry1, typename Geometry2,
- typename Tag1 = typename tag::type,
- typename Tag2 = typename tag::type
+ typename Tag1 = tag_t,
+ typename Tag2 = tag_t
>
struct azimuth : not_implemented
{};
@@ -58,11 +58,12 @@ struct azimuth
template
static auto apply(Point1 const& p1, Point2 const& p2, Strategy const& strategy)
{
- typedef typename decltype(strategy.azimuth())::template result_type
+ auto azimuth_strategy = strategy.azimuth();
+ using calc_t = typename decltype(azimuth_strategy)::template result_type
<
- typename coordinate_type::type,
- typename coordinate_type::type
- >::type calc_t;
+ coordinate_type_t,
+ coordinate_type_t
+ >::type;
calc_t result = 0;
calc_t const x1 = geometry::get_as_radian<0>(p1);
@@ -70,7 +71,7 @@ struct azimuth
calc_t const x2 = geometry::get_as_radian<0>(p2);
calc_t const y2 = geometry::get_as_radian<1>(p2);
- strategy.azimuth().apply(x1, y1, x2, y2, result);
+ azimuth_strategy.apply(x1, y1, x2, y2, result);
// NOTE: It is not clear which units we should use for the result.
// For now radians are always returned but a user could expect
diff --git a/include/boost/geometry/algorithms/convert.hpp b/include/boost/geometry/algorithms/convert.hpp
index 26335ec3d..d9cb61e84 100644
--- a/include/boost/geometry/algorithms/convert.hpp
+++ b/include/boost/geometry/algorithms/convert.hpp
@@ -381,11 +381,9 @@ struct convert
{
static inline void apply(Box const& box, Polygon& polygon)
{
- typedef typename ring_type::type ring_type;
-
convert
<
- Box, ring_type,
+ Box, ring_type_t,
box_tag, ring_tag,
2, false
>::apply(box, exterior_ring(polygon));
@@ -415,10 +413,9 @@ struct convert
{
static inline void apply(Ring const& ring, Polygon& polygon)
{
- typedef typename ring_type::type ring_type;
convert
<
- Ring, ring_type,
+ Ring, ring_type_t,
ring_tag, ring_tag,
DimensionCount, false
>::apply(ring, exterior_ring(polygon));
@@ -431,11 +428,9 @@ struct convert
{
static inline void apply(Polygon const& polygon, Ring& ring)
{
- typedef typename ring_type::type ring_type;
-
convert
<
- ring_type, Ring,
+ ring_type_t, Ring,
ring_tag, ring_tag,
DimensionCount, false
>::apply(exterior_ring(polygon), ring);
diff --git a/include/boost/geometry/algorithms/crosses.hpp b/include/boost/geometry/algorithms/crosses.hpp
index 040076d3d..5d44211dd 100644
--- a/include/boost/geometry/algorithms/crosses.hpp
+++ b/include/boost/geometry/algorithms/crosses.hpp
@@ -48,8 +48,8 @@ template
<
typename Geometry1,
typename Geometry2,
- typename Tag1 = typename tag::type,
- typename Tag2 = typename tag::type
+ typename Tag1 = tag_t,
+ typename Tag2 = tag_t
>
struct crosses
: detail::relate::relate_impl
@@ -215,8 +215,8 @@ namespace resolve_dynamic
template
<
typename Geometry1, typename Geometry2,
- typename Tag1 = typename geometry::tag::type,
- typename Tag2 = typename geometry::tag::type
+ typename Tag1 = geometry::tag_t,
+ typename Tag2 = geometry::tag_t
>
struct crosses
{
diff --git a/include/boost/geometry/algorithms/densify.hpp b/include/boost/geometry/algorithms/densify.hpp
index 3af062ebd..8aa837500 100644
--- a/include/boost/geometry/algorithms/densify.hpp
+++ b/include/boost/geometry/algorithms/densify.hpp
@@ -170,8 +170,8 @@ template
<
typename Geometry,
typename GeometryOut,
- typename Tag1 = typename tag::type,
- typename Tag2 = typename tag::type
+ typename Tag1 = tag_t,
+ typename Tag2 = tag_t
>
struct densify
: not_implemented
@@ -360,7 +360,7 @@ struct densify
namespace resolve_dynamic {
-template ::type>
+template >
struct densify
{
template
diff --git a/include/boost/geometry/algorithms/detail/assign_indexed_point.hpp b/include/boost/geometry/algorithms/detail/assign_indexed_point.hpp
index 9ae46768e..41fced54e 100644
--- a/include/boost/geometry/algorithms/detail/assign_indexed_point.hpp
+++ b/include/boost/geometry/algorithms/detail/assign_indexed_point.hpp
@@ -59,10 +59,7 @@ inline void assign_point_to_index(Point const& point, Geometry& geometry)
detail::for_each_dimension([&](auto dimension)
{
geometry::set(geometry,
- util::numeric_cast
- <
- typename coordinate_type::type
- >(geometry::get(point)));
+ util::numeric_cast>(geometry::get(point)));
});
}
@@ -93,7 +90,7 @@ inline void assign_point_from_index(Geometry const& geometry, Point& point)
geometry::set(point,
util::numeric_cast
<
- typename coordinate_type::type
+ coordinate_type_t
>(geometry::get(geometry)));
});
}
diff --git a/include/boost/geometry/algorithms/detail/assign_values.hpp b/include/boost/geometry/algorithms/detail/assign_values.hpp
index fe72bc568..64ee69f80 100644
--- a/include/boost/geometry/algorithms/detail/assign_values.hpp
+++ b/include/boost/geometry/algorithms/detail/assign_values.hpp
@@ -54,7 +54,7 @@ struct assign_zero_point
template
static inline void apply(Point& point)
{
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
coordinate_type const zero = 0;
detail::for_each_dimension([&](auto dimension)
@@ -71,7 +71,7 @@ struct assign_inverse_box_or_segment
template
static inline void apply(BoxOrSegment& geometry)
{
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
coordinate_type const highest = util::bounds::highest();
coordinate_type const lowest = util::bounds::lowest();
@@ -90,7 +90,7 @@ struct assign_zero_box_or_segment
template
static inline void apply(BoxOrSegment& geometry)
{
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
coordinate_type const zero = 0;
detail::for_each_dimension([&](auto dimension)
@@ -114,7 +114,7 @@ inline void assign_box_2d_corner(Box const& box, Point& point)
assert_dimension();
// Copy coordinates
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
geometry::set<0>(point, util::numeric_cast(get(box)));
geometry::set<1>(point, util::numeric_cast(get(box)));
@@ -125,7 +125,7 @@ inline void assign_box_2d_corner(Box const& box, Point& point)
template
struct assign_2d_box_or_segment
{
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
// Here we assign 4 coordinates to a box of segment
// -> Most logical is: x1,y1,x2,y2
@@ -161,7 +161,7 @@ struct assign
template
struct assign
{
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
template
static inline void apply(Point& point, T const& c1, T const& c2)
@@ -174,7 +174,7 @@ struct assign
template
struct assign
{
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
template
static inline void apply(Point& point, T const& c1, T const& c2, T const& c3)
diff --git a/include/boost/geometry/algorithms/detail/buffer/buffer_box.hpp b/include/boost/geometry/algorithms/detail/buffer/buffer_box.hpp
index f19a91d6b..e26295eb3 100644
--- a/include/boost/geometry/algorithms/detail/buffer/buffer_box.hpp
+++ b/include/boost/geometry/algorithms/detail/buffer/buffer_box.hpp
@@ -26,7 +26,7 @@ namespace detail { namespace buffer
template
struct box_loop
{
- typedef typename coordinate_type::type coordinate_type;
+ using coordinate_type = coordinate_type_t;
static inline void apply(BoxIn const& box_in, T const& distance, BoxOut& box_out)
{
diff --git a/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp b/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp
index 1e6b798cd..02e1bf990 100644
--- a/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp
+++ b/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp
@@ -221,10 +221,10 @@ struct buffer_range
{
boost::ignore_unused(segment_strategy);
- typedef typename std::iterator_traits
+ using point_type = typename std::iterator_traits
<
Iterator
- >::value_type point_type;
+ >::value_type;
point_type second_point, penultimate_point, ultimate_point; // last two points from begin/end
@@ -469,7 +469,7 @@ struct buffer_inserter_ring
{
output_point_type first_p1, first_p2, last_p1, last_p2;
- typedef detail::buffer::buffer_range buffer_range;
+ using buffer_range = detail::buffer::buffer_range;
geometry::strategy::buffer::result_code result
= buffer_range::iterate(collection, begin, end,
@@ -747,11 +747,10 @@ template
struct buffer_inserter
{
private:
- typedef typename ring_type::type input_ring_type;
- typedef typename ring_type::type output_ring_type;
-
- typedef buffer_inserter_ring policy;
+ using input_ring_type = ring_type_t;
+ using output_ring_type = ring_type_t;
+ using policy = buffer_inserter_ring;
template
<
@@ -873,12 +872,9 @@ struct buffer_inserter
PolygonOutput,
dispatch::buffer_inserter
<
- typename single_tag_of
- <
- typename tag::type
- >::type,
+ typename single_tag_of>::type,
typename boost::range_value::type,
- typename geometry::ring_type::type
+ geometry::ring_type_t
>
>
{};
@@ -918,7 +914,7 @@ inline void buffer_inserter(GeometryInput const& geometry_input, OutputIterator
using collection_type = detail::buffer::buffered_piece_collection
<
- typename geometry::ring_type::type,
+ geometry::ring_type_t,
Strategies,
DistanceStrategy
>;
diff --git a/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp b/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp
index e843b27d9..1685bc858 100644
--- a/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp
+++ b/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp
@@ -39,7 +39,7 @@ namespace detail { namespace buffer
class backtrack_for_buffer
{
public :
- typedef detail::overlay::backtrack_state state_type;
+ using state_type = detail::overlay::backtrack_state;
template
<
@@ -87,20 +87,6 @@ g_backtrack_warning_count++;
struct buffer_overlay_visitor
{
public :
- void print(char const* /*header*/)
- {
- }
-
- template
- void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/)
- {
- }
-
- template
- void print(char const* /*header*/, Turns const& /*turns*/, int /*turn_index*/, int /*op_index*/)
- {
- }
-
template
void visit_turns(int , Turns const& ) {}
@@ -148,7 +134,7 @@ struct buffer_turn_info
buffer_turn_operation
>
{
- typedef Point point_type;
+ using point_type = Point;
std::size_t turn_index;
@@ -170,26 +156,6 @@ struct buffer_turn_info
{}
};
-struct buffer_less
-{
- template
- inline bool operator()(Indexed const& left, Indexed const& right) const
- {
- if (! (left.subject->seg_id == right.subject->seg_id))
- {
- return left.subject->seg_id < right.subject->seg_id;
- }
-
- // Both left and right are located on the SAME segment.
- if (! (left.subject->fraction == right.subject->fraction))
- {
- return left.subject->fraction < right.subject->fraction;
- }
-
- return left.turn_index < right.turn_index;
- }
-};
-
template
struct piece_get_box
{
diff --git a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
index 3f20813b4..9a836375c 100644
--- a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
+++ b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
@@ -124,29 +124,29 @@ template
>
struct buffered_piece_collection
{
- typedef typename geometry::point_type::type point_type;
- typedef typename geometry::coordinate_type::type coordinate_type;
+ using point_type = geometry::point_type_t;
+ using coordinate_type = geometry::coordinate_type_t;
// Ring/polygon type, always clockwise
- typedef geometry::model::ring clockwise_ring_type;
+ using clockwise_ring_type = geometry::model::ring;
- typedef geometry::model::box box_type;
+ using box_type = geometry::model::box;
- typedef buffer_turn_info
+ using buffer_turn_info_type = buffer_turn_info
<
point_type,
typename segment_ratio_type::type
- > buffer_turn_info_type;
+ >;
- typedef buffer_turn_operation
+ using buffer_turn_operation_type = buffer_turn_operation
<
point_type,
typename segment_ratio_type::type
- > buffer_turn_operation_type;
+ >;
- typedef std::vector turn_vector_type;
+ using turn_vector_type = std::vector;
- typedef piece_border piece_border_type;
+ using piece_border_type = piece_border ;
struct piece
{
@@ -203,7 +203,7 @@ struct buffered_piece_collection
struct original_ring
{
- typedef geometry::sections sections_type;
+ using sections_type = geometry::sections;
// Creates an empty instance
inline original_ring()
@@ -224,7 +224,7 @@ struct buffered_piece_collection
// The dimension is critical because the direction is later used
// in the optimization for within checks using winding strategy
// and this strategy is scanning in x direction.
- typedef std::integer_sequence dimensions;
+ using dimensions = std::integer_sequence;
geometry::sectionalize
<
false, dimensions
@@ -239,7 +239,7 @@ struct buffered_piece_collection
bool m_has_interiors;
};
- typedef std::vector piece_vector_type;
+ using piece_vector_type = std::vector;
piece_vector_type m_pieces;
turn_vector_type m_turns;
@@ -258,15 +258,15 @@ struct buffered_piece_collection
segment_identifier current_segment_id;
// Monotonic sections (used for offsetted rings around points)
- typedef geometry::sections sections_type;
+ using sections_type = geometry::sections;
sections_type monotonic_sections;
// Define the clusters, mapping cluster_id -> turns
- typedef std::map
+ using cluster_type = std::map
<
signed_size_type,
detail::overlay::cluster_info
- > cluster_type;
+ >;
cluster_type m_clusters;
@@ -447,7 +447,7 @@ struct buffered_piece_collection
// Check if turns are inside pieces
turn_in_piece_visitor
<
- typename geometry::cs_tag::type,
+ geometry::cs_tag_t,
turn_vector_type, piece_vector_type, DistanceStrategy, Strategy
> visitor(m_turns, m_pieces, m_distance_strategy, m_strategy);
@@ -1028,14 +1028,14 @@ struct buffered_piece_collection
inline void traverse()
{
- typedef detail::overlay::traverse
+ using traverser = detail::overlay::traverse
<
false, false,
buffered_ring_collection >,
buffered_ring_collection >,
overlay_buffer,
backtrack_for_buffer
- > traverser;
+ >;
std::map turn_info_per_ring;
traversed_rings.clear();
@@ -1065,14 +1065,14 @@ struct buffered_piece_collection
template
inline OutputIterator assign(OutputIterator out) const
{
- typedef typename geometry::area_result
+ using area_result_type = typename geometry::area_result
<
buffered_ring, Strategy
- >::type area_result_type;
- typedef detail::overlay::ring_properties
+ >::type;
+ using properties = detail::overlay::ring_properties
<
point_type, area_result_type
- > properties;
+ >;
std::map selected;
diff --git a/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp
index 6118ec43b..00f3efa5e 100644
--- a/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp
+++ b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp
@@ -108,7 +108,7 @@ namespace traits
template
struct tag >
{
- typedef ring_tag type;
+ using type = ring_tag;
};
@@ -129,13 +129,13 @@ struct closure >
template
struct point_type >
{
- typedef typename geometry::point_type::type type;
+ using type = geometry::point_type_t;
};
template
struct tag >
{
- typedef geometry::detail::buffer::buffered_ring_collection_tag type;
+ using type = geometry::detail::buffer::buffered_ring_collection_tag;
};
@@ -154,7 +154,7 @@ struct ring_type
detail::buffer::buffered_ring_collection
>
{
- typedef Ring type;
+ using type = Ring;
};
@@ -177,7 +177,7 @@ struct point_order
struct single_tag_of
{
- typedef ring_tag type;
+ using type = ring_tag;
};
@@ -269,7 +269,7 @@ template<>
struct get_ring
{
template
- static inline typename ring_type::type const& apply(
+ static inline ring_type_t const& apply(
ring_identifier const& id,
MultiGeometry const& multi_ring)
{
diff --git a/include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp b/include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp
index 3775e604e..9c9509ce7 100644
--- a/include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp
+++ b/include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp
@@ -43,8 +43,8 @@ namespace detail { namespace buffer
template
struct unique_sub_range_from_piece
{
- typedef typename boost::range_iterator::type iterator_type;
- typedef typename geometry::point_type::type point_type;
+ using iterator_type = typename boost::range_iterator::type;
+ using point_type = geometry::point_type_t;
unique_sub_range_from_piece(Ring const& ring,
iterator_type iterator_at_i, iterator_type iterator_at_j)
@@ -190,8 +190,8 @@ class piece_turn_visitor
inline void calculate_turns(Piece const& piece1, Piece const& piece2,
Section const& section1, Section const& section2)
{
- typedef typename boost::range_value::type ring_type;
- typedef typename boost::range_value::type turn_type;
+ using ring_type = typename boost::range_value::type;
+ using turn_type = typename boost::range_value::type;
signed_size_type const piece1_first_index = piece1.first_seg_id.segment_index;
signed_size_type const piece2_first_index = piece2.first_seg_id.segment_index;
@@ -261,10 +261,10 @@ class piece_turn_visitor
{
unique_sub_range_from_piece unique_sub_range2(ring2, prev2, it2);
- typedef detail::overlay::get_turn_info
+ using turn_policy = detail::overlay::get_turn_info
<
detail::overlay::assign_policy_only_start_turns
- > turn_policy;
+ >;
turn_policy::apply(unique_sub_range1, unique_sub_range2,
the_model,
@@ -292,9 +292,8 @@ public:
{
boost::ignore_unused(first);
- typedef typename boost::range_value::type piece_type;
- piece_type const& piece1 = m_pieces[section1.ring_id.source_index];
- piece_type const& piece2 = m_pieces[section2.ring_id.source_index];
+ auto const& piece1 = m_pieces[section1.ring_id.source_index];
+ auto const& piece2 = m_pieces[section2.ring_id.source_index];
if ( piece1.index == piece2.index
|| is_adjacent(piece1, piece2)
diff --git a/include/boost/geometry/algorithms/detail/buffer/implementation.hpp b/include/boost/geometry/algorithms/detail/buffer/implementation.hpp
index a9608a440..0f7a87bc8 100644
--- a/include/boost/geometry/algorithms/detail/buffer/implementation.hpp
+++ b/include/boost/geometry/algorithms/detail/buffer/implementation.hpp
@@ -76,7 +76,7 @@ struct buffer_all
PointStrategy const& point_strategy,
Strategies const& strategies)
{
- typedef typename boost::range_value