diff --git a/include/boost/geometry/algorithms/convert.hpp b/include/boost/geometry/algorithms/convert.hpp index 26335ec3d1..d9cb61e843 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/detail/buffer/buffer_inserter.hpp b/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp index 46522bcde5..00592a446f 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp @@ -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 < @@ -875,7 +874,7 @@ struct buffer_inserter < typename single_tag_of>::type, typename boost::range_value::type, - typename geometry::ring_type::type + geometry::ring_type_t > > {}; @@ -915,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/buffered_ring.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp index 25141f93f0..5bf34cd57a 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp @@ -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/disjoint/linear_areal.hpp b/include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp index a4b86d3973..5c1008a147 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/linear_areal.hpp @@ -170,7 +170,7 @@ class disjoint_segment_areal { if (! disjoint_range_segment_or_box < - typename geometry::ring_type::type, + geometry::ring_type_t, Segment >::apply(geometry::exterior_ring(polygon), segment, strategy)) { diff --git a/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp b/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp index 6fc96d1678..cf332734dd 100644 --- a/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp @@ -253,7 +253,7 @@ class point_to_polygon private: typedef point_to_range < - Point, typename ring_type::type, Closure, Strategies + Point, ring_type_t, Closure, Strategies > per_ring; struct distance_to_interior_rings diff --git a/include/boost/geometry/algorithms/detail/envelope/areal.hpp b/include/boost/geometry/algorithms/detail/envelope/areal.hpp index ece4d3d144..c375ded559 100644 --- a/include/boost/geometry/algorithms/detail/envelope/areal.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/areal.hpp @@ -54,8 +54,7 @@ struct envelope_polygon template static inline void apply(Polygon const& polygon, Box& mbr, Strategy const& strategy) { - typename ring_return_type::type ext_ring - = exterior_ring(polygon); + ring_return_type_t ext_ring = exterior_ring(polygon); if (geometry::is_empty(ext_ring)) { diff --git a/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp b/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp index b49dafde90..419f6115de 100644 --- a/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp +++ b/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp @@ -395,9 +395,7 @@ struct polygon_collect_vectors { static inline void apply(Collection& collection, Polygon const& polygon) { - typedef typename geometry::ring_type::type ring_type; - - typedef range_collect_vectors per_range; + using per_range = range_collect_vectors, Collection>; per_range::apply(collection, exterior_ring(polygon)); auto const& rings = interior_rings(polygon); diff --git a/include/boost/geometry/algorithms/detail/extreme_points.hpp b/include/boost/geometry/algorithms/detail/extreme_points.hpp index 370e45aedd..8480b01675 100644 --- a/include/boost/geometry/algorithms/detail/extreme_points.hpp +++ b/include/boost/geometry/algorithms/detail/extreme_points.hpp @@ -412,11 +412,10 @@ struct extreme_points static inline bool apply(Polygon const& polygon, Extremes& extremes, Intruders& intruders, SideStrategy const& strategy) { - typedef typename geometry::ring_type::type ring_type; - typedef detail::extreme_points::extreme_points_on_ring + using ring_implementation = detail::extreme_points::extreme_points_on_ring < - ring_type, Dimension - > ring_implementation; + geometry::ring_type_t, Dimension + >; if (! ring_implementation::apply(geometry::exterior_ring(polygon), extremes, intruders, strategy)) diff --git a/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp b/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp index fdbc6a32c9..8e81df2477 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp @@ -122,15 +122,14 @@ class is_valid_polygon VisitPolicy& visitor, Strategy const& strategy) { - typedef debug_validity_phase debug_phase; - typedef typename ring_type::type ring_type; + using debug_phase = debug_validity_phase; // check validity of exterior ring debug_phase::apply(1); if (! detail::is_valid::is_valid_ring < - ring_type, + ring_type_t, false // do not check self intersections >::apply(exterior_ring(polygon), visitor, strategy)) { diff --git a/include/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp b/include/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp index 836a94bb3e..1c5042be87 100644 --- a/include/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/copy_segment_point.hpp @@ -92,7 +92,7 @@ struct copy_segment_point_polygon // Call ring-version with the right ring return copy_segment_point_range < - typename geometry::ring_type::type, + geometry::ring_type_t, Reverse, SegmentIdentifier, PointOut diff --git a/include/boost/geometry/algorithms/detail/overlay/get_ring.hpp b/include/boost/geometry/algorithms/detail/overlay/get_ring.hpp index 646efe3839..7943238fdb 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_ring.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_ring.hpp @@ -83,7 +83,7 @@ template<> struct get_ring { template - static inline typename ring_return_type::type const apply( + static inline ring_return_type_t const apply( ring_identifier const& id, Polygon const& polygon) { @@ -103,7 +103,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, MultiPolygon const& multi_polygon) { diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp index 581ad9795e..755a928562 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp @@ -200,13 +200,13 @@ class get_turns_in_sections { using range1_view = detail::closed_clockwise_view < - typename ring_type::type const, + ring_type_t const, geometry::closure::value, Reverse1 ? counterclockwise : clockwise >; using range2_view = detail::closed_clockwise_view < - typename ring_type::type const, + ring_type_t const, geometry::closure::value, Reverse2 ? counterclockwise : clockwise >; @@ -740,14 +740,12 @@ struct get_turns_polygon_cs InterruptPolicy& interrupt_policy, signed_size_type multi_index = -1) { - typedef typename geometry::ring_type::type ring_type; - - typedef detail::get_turns::get_turns_cs + using intersector_type = detail::get_turns::get_turns_cs < - ring_type, Box, + geometry::ring_type_t, Box, Reverse, ReverseBox, TurnPolicy - > intersector_type; + >; intersector_type::apply( source_id1, geometry::exterior_ring(polygon), diff --git a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp index 851f8706ee..e51e04d28e 100644 --- a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp @@ -177,14 +177,14 @@ inline OutputIterator return_if_one_input_is_empty(Geometry1 const& geometry1, Geometry2 const& geometry2, OutputIterator out, Strategy const& strategy) { - typedef typename geometry::ring_type::type ring_type; - typedef std::deque ring_container_type; + using ring_type = geometry::ring_type_t; + using ring_container_type = std::deque; - typedef ring_properties + using properties = ring_properties < geometry::point_type_t, typename geometry::area_result::type - > properties; + >; // Silence warning C4127: conditional expression is constant #if defined(_MSC_VER) @@ -256,7 +256,7 @@ struct overlay >; using turn_container_type = std::deque; - using ring_type = typename geometry::ring_type::type; + using ring_type = geometry::ring_type_t; using ring_container_type = std::deque; // Define the clusters, mapping cluster_id -> turns diff --git a/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp b/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp index 0d2f7cdc27..486a662c64 100644 --- a/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/select_rings.hpp @@ -113,8 +113,7 @@ namespace dispatch ring_identifier id, RingPropertyMap& ring_properties, Strategy const& strategy) { - typedef typename geometry::ring_type::type ring_type; - typedef select_rings per_ring; + using per_ring = select_rings>; per_ring::apply(exterior_ring(polygon), geometry, id, ring_properties, strategy); @@ -131,8 +130,7 @@ namespace dispatch ring_identifier id, RingPropertyMap& ring_properties, Strategy const& strategy) { - typedef typename geometry::ring_type::type ring_type; - typedef select_rings per_ring; + using per_ring = select_rings>; per_ring::apply(exterior_ring(polygon), id, ring_properties, strategy); diff --git a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp index 70b253f1cf..9be59bd737 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp @@ -271,7 +271,7 @@ inline bool calculate_from_inside(Geometry1 const& geometry1, auto const& range1 = sub_range(geometry1, turn.operations[op_id].seg_id); - using range2_view = detail::closed_clockwise_view::type const>; + using range2_view = detail::closed_clockwise_view const>; range2_view const range2(sub_range(geometry2, turn.operations[other_op_id].seg_id)); BOOST_GEOMETRY_ASSERT(boost::size(range1)); diff --git a/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp b/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp index e16fdd8908..315a753317 100644 --- a/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp +++ b/include/boost/geometry/algorithms/detail/sections/range_by_section.hpp @@ -53,7 +53,7 @@ struct full_section_range template struct full_section_polygon { - static inline typename ring_return_type::type apply(Polygon const& polygon, Section const& section) + static inline ring_return_type_t apply(Polygon const& polygon, Section const& section) { return section.ring_id.ring_index < 0 ? geometry::exterior_ring(polygon) @@ -71,10 +71,10 @@ template > struct full_section_multi { - static inline typename ring_return_type::type apply( + static inline ring_return_type_t apply( MultiGeometry const& multi, Section const& section) { - typedef typename boost::range_size::type size_type; + using size_type = typename boost::range_size::type; BOOST_GEOMETRY_ASSERT ( @@ -171,7 +171,7 @@ struct range_by_section \param section structure with section */ template -inline typename ring_return_type::type +inline ring_return_type_t range_by_section(Geometry const& geometry, Section const& section) { concepts::check(); diff --git a/include/boost/geometry/algorithms/detail/sub_range.hpp b/include/boost/geometry/algorithms/detail/sub_range.hpp index 23efb5bc2b..c85b885371 100644 --- a/include/boost/geometry/algorithms/detail/sub_range.hpp +++ b/include/boost/geometry/algorithms/detail/sub_range.hpp @@ -58,7 +58,7 @@ struct sub_range template struct sub_range { - typedef typename geometry::ring_return_type::type return_type; + using return_type = geometry::ring_return_type_t; template static inline return_type apply(Geometry & geometry, Id const& id) @@ -69,10 +69,10 @@ struct sub_range } else { - typedef typename boost::range_size + using size_type = typename boost::range_size < typename geometry::interior_type::type - >::type size_type; + >::type; size_type const ri = static_cast(id.ring_index); return range::at(geometry::interior_rings(geometry), ri); } diff --git a/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp b/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp index 4b195a85b4..7ef58a8132 100644 --- a/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp @@ -194,7 +194,7 @@ struct point_in_geometry { int const code = point_in_geometry < - typename ring_type::type + ring_type_t >::apply(point, exterior_ring(polygon), strategy); if (code == 1) @@ -204,7 +204,7 @@ struct point_in_geometry { int const interior_code = point_in_geometry < - typename ring_type::type + ring_type_t >::apply(point, *it, strategy); if (interior_code != -1) diff --git a/include/boost/geometry/algorithms/perimeter.hpp b/include/boost/geometry/algorithms/perimeter.hpp index 900258904b..c99a555b2f 100644 --- a/include/boost/geometry/algorithms/perimeter.hpp +++ b/include/boost/geometry/algorithms/perimeter.hpp @@ -75,12 +75,12 @@ struct perimeter template struct perimeter : detail::calculate_polygon_sum { - typedef typename default_length_result::type return_type; - typedef detail::length::range_length + using return_type = typename default_length_result::type; + using policy = detail::length::range_length < - typename ring_type::type, + ring_type_t, closure::value - > policy; + >; template static inline return_type apply(Polygon const& polygon, Strategy const& strategy) diff --git a/include/boost/geometry/core/exterior_ring.hpp b/include/boost/geometry/core/exterior_ring.hpp index 717467914d..e1477f83da 100644 --- a/include/boost/geometry/core/exterior_ring.hpp +++ b/include/boost/geometry/core/exterior_ring.hpp @@ -75,14 +75,9 @@ struct exterior_ring template struct exterior_ring { - static - typename geometry::ring_return_type::type - apply(Polygon& polygon) + static geometry::ring_return_type_t apply(Polygon& polygon) { - return traits::exterior_ring - < - typename std::remove_const::type - >::get(polygon); + return traits::exterior_ring>::get(polygon); } }; @@ -100,7 +95,7 @@ struct exterior_ring \return a reference to the exterior ring */ template -inline typename ring_return_type::type exterior_ring(Polygon& polygon) +inline ring_return_type_t exterior_ring(Polygon& polygon) { return core_dispatch::exterior_ring < @@ -121,8 +116,7 @@ inline typename ring_return_type::type exterior_ring(Polygon& polygon) \qbk{distinguish,const version} */ template -inline typename ring_return_type::type exterior_ring( - Polygon const& polygon) +inline ring_return_type_t exterior_ring(Polygon const& polygon) { return core_dispatch::exterior_ring < diff --git a/include/boost/geometry/core/interior_rings.hpp b/include/boost/geometry/core/interior_rings.hpp index 7d6b82d0b9..89e8e3d325 100644 --- a/include/boost/geometry/core/interior_rings.hpp +++ b/include/boost/geometry/core/interior_rings.hpp @@ -90,11 +90,11 @@ struct interior_rings template struct interior_type { - typedef typename core_dispatch::interior_type + using type = typename core_dispatch::interior_type < polygon_tag, typename boost::range_value::type - >::type type; + >::type; }; @@ -113,7 +113,7 @@ struct interior_type */ template -inline typename interior_return_type::type interior_rings(Polygon& polygon) +inline interior_return_type_t interior_rings(Polygon& polygon) { return core_dispatch::interior_rings < @@ -134,8 +134,7 @@ inline typename interior_return_type::type interior_rings(Polygon& poly \qbk{distinguish,const version} */ template -inline typename interior_return_type::type interior_rings( - Polygon const& polygon) +inline interior_return_type_t interior_rings(Polygon const& polygon) { return core_dispatch::interior_rings < diff --git a/include/boost/geometry/core/interior_type.hpp b/include/boost/geometry/core/interior_type.hpp index 5daa7f476b..02048296f2 100644 --- a/include/boost/geometry/core/interior_type.hpp +++ b/include/boost/geometry/core/interior_type.hpp @@ -39,7 +39,7 @@ namespace traits \par Geometries: - polygon \par Specializations should provide: - - typedef X type ( e.g. std::vector<myring<P>> ) + - using type = X ( e.g. std::vector<myring<P>> ) \tparam Geometry geometry */ template @@ -81,14 +81,14 @@ struct interior_return_type template struct interior_return_type { - typedef typename std::remove_const::type nc_polygon_type; + using nc_polygon_type = std::remove_const_t; - typedef std::conditional_t + using type = std::conditional_t < std::is_const::value, typename traits::interior_const_type::type, typename traits::interior_mutable_type::type - > type; + >; }; @@ -106,10 +106,10 @@ struct interior_type template struct interior_type { - typedef typename std::remove_reference + using type = std::remove_reference_t < typename interior_return_type::type - >::type type; + >; }; @@ -132,24 +132,32 @@ struct interior_type template struct interior_type { - typedef typename core_dispatch::interior_type + using type = typename core_dispatch::interior_type < tag_t, Geometry - >::type type; + >::type; }; +template +using interior_type_t = typename interior_type::type; + + template struct interior_return_type { - typedef typename core_dispatch::interior_return_type + using type = typename core_dispatch::interior_return_type < tag_t, Geometry - >::type type; + >::type; }; +template +using interior_return_type_t = typename interior_return_type::type; + + }} // namespace boost::geometry diff --git a/include/boost/geometry/core/point_type.hpp b/include/boost/geometry/core/point_type.hpp index 07bcc771a9..89c572c241 100644 --- a/include/boost/geometry/core/point_type.hpp +++ b/include/boost/geometry/core/point_type.hpp @@ -66,10 +66,10 @@ template struct point_type { // Default: call traits to get point type - typedef typename std::remove_const + using type = std::remove_const_t < typename traits::point_type::type - >::type type; + >; }; @@ -77,7 +77,7 @@ struct point_type template struct point_type { - typedef Point type; + using type = Point; }; @@ -85,14 +85,14 @@ struct point_type template struct point_type { - typedef typename boost::range_value::type type; + using type = typename boost::range_value::type; }; template struct point_type { - typedef typename boost::range_value::type type; + using type = typename boost::range_value::type; }; @@ -100,43 +100,43 @@ struct point_type template struct point_type { - typedef typename point_type + using type = typename point_type < ring_tag, typename ring_type::type - >::type type; + >::type; }; template struct point_type { - typedef typename boost::range_value + using type = typename boost::range_value < MultiPoint - >::type type; + >::type; }; template struct point_type { - typedef typename point_type + using type = typename point_type < linestring_tag, typename boost::range_value::type - >::type type; + >::type; }; template struct point_type { - typedef typename point_type + using type = typename point_type < polygon_tag, typename boost::range_value::type - >::type type; + >::type; }; diff --git a/include/boost/geometry/core/ring_type.hpp b/include/boost/geometry/core/ring_type.hpp index 43a6ae8194..e382c61172 100644 --- a/include/boost/geometry/core/ring_type.hpp +++ b/include/boost/geometry/core/ring_type.hpp @@ -106,7 +106,7 @@ struct ring_return_type template struct ring_return_type { - typedef typename ring_return_type + using type = typename ring_return_type < linestring_tag, std::conditional_t @@ -115,14 +115,14 @@ struct ring_return_type typename boost::range_value::type const, typename boost::range_value::type > - >::type type; + >::type; }; template struct ring_return_type { - typedef typename ring_return_type + using type = typename ring_return_type < polygon_tag, std::conditional_t @@ -131,7 +131,7 @@ struct ring_return_type typename boost::range_value::type const, typename boost::range_value::type > - >::type type; + >::type; }; @@ -157,30 +157,30 @@ struct ring_type template struct ring_type { - typedef typename std::remove_reference + using type = std::remove_reference_t < typename ring_return_type::type - >::type type; + >; }; template struct ring_type { - typedef typename std::remove_reference + using type = std::remove_reference_t < typename ring_return_type::type - >::type type; + >; }; template struct ring_type { - typedef typename std::remove_reference + using type = std::remove_reference_t < typename ring_return_type::type - >::type type; + >; }; diff --git a/include/boost/geometry/io/dsv/write.hpp b/include/boost/geometry/io/dsv/write.hpp index 8a120d0925..60a6e9af7f 100644 --- a/include/boost/geometry/io/dsv/write.hpp +++ b/include/boost/geometry/io/dsv/write.hpp @@ -207,17 +207,17 @@ struct dsv_poly Polygon const& poly, dsv_settings const& settings) { - typedef typename ring_type::type ring; + using ring_t = ring_type_t; os << settings.list_open; - dsv_range::apply(os, exterior_ring(poly), settings); + dsv_range::apply(os, exterior_ring(poly), settings); auto const& rings = interior_rings(poly); for (auto it = boost::begin(rings); it != boost::end(rings); ++it) { os << settings.list_separator; - dsv_range::apply(os, *it, settings); + dsv_range::apply(os, *it, settings); } os << settings.list_close; } diff --git a/include/boost/geometry/io/svg/write.hpp b/include/boost/geometry/io/svg/write.hpp index 67a5f20cbd..402cc80080 100644 --- a/include/boost/geometry/io/svg/write.hpp +++ b/include/boost/geometry/io/svg/write.hpp @@ -139,12 +139,10 @@ struct svg_poly static inline void apply(std::basic_ostream& os, Polygon const& polygon, std::string const& style, double) { - typedef typename geometry::ring_type::type ring_type; - bool first = true; os << " struct polygon_parser { - using ring_return_type = typename ring_return_type::type; - using appender = container_appender; + using appender = container_appender>; template static inline void apply(TokenizerIterator& it, @@ -443,7 +442,7 @@ struct polygon_parser } else { - typename ring_type::type ring; + ring_type_t ring; appender::apply(it, end, wkt, ring); range::push_back(geometry::interior_rings(poly), std::move(ring)); } diff --git a/include/boost/geometry/io/wkt/write.hpp b/include/boost/geometry/io/wkt/write.hpp index 52d0659e32..e1e9a03ef4 100644 --- a/include/boost/geometry/io/wkt/write.hpp +++ b/include/boost/geometry/io/wkt/write.hpp @@ -199,7 +199,7 @@ struct wkt_poly static inline void apply(std::basic_ostream& os, Polygon const& poly, bool force_closure) { - using ring = typename ring_type::type; + using ring_t = ring_type_t; auto const& exterior = exterior_ring(poly); auto const& rings = interior_rings(poly); @@ -215,12 +215,12 @@ struct wkt_poly os << "("; if (point_count > 0) { - wkt_sequence::apply(os, exterior, force_closure); + wkt_sequence::apply(os, exterior, force_closure); for (auto it = boost::begin(rings); it != boost::end(rings); ++it) { os << ","; - wkt_sequence::apply(os, *it, force_closure); + wkt_sequence::apply(os, *it, force_closure); } } os << ")"; diff --git a/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp b/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp index 1e9efe4f5e..0e57178daa 100644 --- a/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp +++ b/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp @@ -51,8 +51,8 @@ struct inner_range_type typedef std::conditional_t < ! std::is_const::value, - typename geometry::ring_type::type, - typename geometry::ring_type::type const + geometry::ring_type_t, + geometry::ring_type_t const > type; }; diff --git a/include/boost/geometry/views/detail/boundary_view/implementation.hpp b/include/boost/geometry/views/detail/boundary_view/implementation.hpp index 277ce1be66..78ea7fa6e4 100644 --- a/include/boost/geometry/views/detail/boundary_view/implementation.hpp +++ b/include/boost/geometry/views/detail/boundary_view/implementation.hpp @@ -51,14 +51,11 @@ namespace detail { namespace boundary_views template < typename Polygon, - typename Value = typename ring_type::type, - typename Reference = typename ring_return_type::type, + typename Value = ring_type_t, + typename Reference = ring_return_type_t, typename Difference = typename boost::range_difference < - typename std::remove_reference - < - typename interior_return_type::type - >::type + std::remove_reference_t> >::type > class polygon_rings_iterator @@ -71,13 +68,10 @@ class polygon_rings_iterator Difference > { - typedef typename boost::range_size + using size_type = typename boost::range_size < - typename std::remove_reference - < - typename interior_return_type::type - >::type - >::type size_type; + std::remove_reference_t> + >::type; public: // default constructor @@ -328,7 +322,7 @@ class views_container_initializer template class areal_boundary { - typedef boundary_view::type> boundary_view_type; + typedef boundary_view> boundary_view_type; typedef views_container_initializer exception_safe_initializer; template diff --git a/test/algorithms/distance/test_distance_common.hpp b/test/algorithms/distance/test_distance_common.hpp index 88c2747d52..22ecbed3df 100644 --- a/test/algorithms/distance/test_distance_common.hpp +++ b/test/algorithms/distance/test_distance_common.hpp @@ -355,9 +355,9 @@ struct test_distance_of_geometries > : public test_distance_of_geometries { - typedef test_distance_of_geometries base; + using base = test_distance_of_geometries; - typedef typename bg::ring_type::type ring_type; + using ring_type = bg::ring_type_t; template < @@ -462,7 +462,7 @@ struct test_distance_of_geometries > : public test_distance_of_geometries { - typedef test_distance_of_geometries base; + using base = test_distance_of_geometries; template < diff --git a/test/algorithms/overlay/dissolver.cpp b/test/algorithms/overlay/dissolver.cpp index 2d8e28a0f3..05c2f19642 100644 --- a/test/algorithms/overlay/dissolver.cpp +++ b/test/algorithms/overlay/dissolver.cpp @@ -39,9 +39,8 @@ void test_dissolve_plusmin(std::string const& caseid, Collection const& input, T const& expected_positive_area, T const& expected_negative_area) { - typedef typename boost::range_value::type geometry_type; - typedef typename bg::point_type::type point_type; - + using geometry_type = typename boost::range_value::type; + using point_type = bg::point_type_t; GeometryOut output; bg::dissolver(input, output); @@ -117,8 +116,8 @@ void test_geometry(std::string const& caseid, std::string const& wkt, // Test std::vector { - typedef typename boost::range_value::type polygon_type; - typedef typename bg::ring_type::type ring_type; + using polygon_type = typename boost::range_value::type; + using ring_type = bg::ring_type_t; std::vector rings; for (polygon_type const& polygon : multi_polygon) { @@ -163,8 +162,8 @@ void test_geometry(std::string const& caseid, std::string const& wkt, template void test_all() { - typedef bg::model::polygon polygon; - typedef bg::model::multi_polygon multi_polygon; + using polygon = bg::model::polygon; + using multi_polygon = bg::model::multi_polygon; test_geometry("simplex_one", "MULTIPOLYGON(((0 0,1 4,4 1,0 0)))", diff --git a/test/algorithms/overlay/split_rings.cpp b/test/algorithms/overlay/split_rings.cpp index 90704de0e5..7bbfb22cff 100644 --- a/test/algorithms/overlay/split_rings.cpp +++ b/test/algorithms/overlay/split_rings.cpp @@ -47,7 +47,7 @@ struct test_split_rings double precision) { - typedef typename bg::ring_type::type ring_type; + using ring_type = bg::ring_type_t:; std::vector rings; bg::split_rings(geometry, rings); diff --git a/test/core/ring.cpp b/test/core/ring.cpp index cf7ee5d7ed..bd7b722d82 100644 --- a/test/core/ring.cpp +++ b/test/core/ring.cpp @@ -52,9 +52,9 @@ void test_ring(std::string const& wkt, std::size_t expected_interior_ring_count, std::size_t expected_first_interior_count) { - typedef bg::model::polygon

the_polygon; - typedef typename bg::ring_type::type the_ring; - typedef typename bg::interior_return_type::type the_interior; + using the_polygon = bg::model::polygon

; + using the_ring = bg::ring_type_t; + using the_interior = bg::interior_return_type_t; the_polygon poly; bg::read_wkt(wkt, poly); diff --git a/test/robustness/common/make_square_polygon.hpp b/test/robustness/common/make_square_polygon.hpp index 2127a6b177..bb84af463f 100644 --- a/test/robustness/common/make_square_polygon.hpp +++ b/test/robustness/common/make_square_polygon.hpp @@ -23,7 +23,7 @@ inline void make_square_polygon(Polygon& polygon, Generator& generator, Settings x = generator(); y = generator(); - typename ring_type::type& ring = exterior_ring(polygon); + auto& ring = exterior_ring(polygon); point_type p; set<0>(p, x); set<1>(p, y); append(ring, p);