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..c0fc0ca4a 100644 --- a/include/boost/geometry/algorithms/azimuth.hpp +++ b/include/boost/geometry/algorithms/azimuth.hpp @@ -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/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/buffered_piece_collection.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp index 3f20813b4..ac187ff7e 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp @@ -124,8 +124,8 @@ 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; diff --git a/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp index 6118ec43b..1dc313700 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp @@ -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; }; 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..a0fb8403c 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) diff --git a/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp b/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp index f217c53b0..f98f9847b 100644 --- a/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/line_line_intersection.hpp @@ -64,7 +64,7 @@ struct line_line_intersection // in a custom strategy, then the calculation of the point in between // might be incorrect and the optimization is not used. - using ct = typename coordinate_type::type; + using ct = coordinate_type_t; auto const p = detail::make::make_infinite_line(pi, pj); auto const q = detail::make::make_infinite_line(qi, qj); diff --git a/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp b/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp index 3861fcbe5..156f7b3c5 100644 --- a/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp @@ -103,9 +103,9 @@ namespace detail { namespace buffer template struct piece_border { - typedef typename geometry::coordinate_type::type coordinate_type; - typedef typename default_comparable_distance_result::type radius_type; - typedef typename geometry::strategy::buffer::turn_in_ring_winding::state_type state_type; + using coordinate_type = geometry::coordinate_type_t; + using radius_type = typename default_comparable_distance_result::type; + using state_type = typename geometry::strategy::buffer::turn_in_ring_winding::state_type; bool m_reversed; diff --git a/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp b/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp index 6baf19078..593131d05 100644 --- a/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp +++ b/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp @@ -53,8 +53,8 @@ template > struct translating_transformer { - typedef typename geometry::point_type::type point_type; - typedef boost::reference_wrapper result_type; + using point_type = geometry::point_type_t; + using result_type = boost::reference_wrapper; explicit translating_transformer(Geometry const&) {} explicit translating_transformer(point_type const&) {} @@ -72,8 +72,8 @@ struct translating_transformer template struct translating_transformer { - typedef typename geometry::point_type::type point_type; - typedef point_type result_type; + using point_type = geometry::point_type_t; + using result_type = point_type; explicit translating_transformer(Geometry const& geom) : m_origin(NULL) diff --git a/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp b/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp index d856927f3..de0cd59b8 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/linear_or_areal_to_areal.hpp @@ -38,7 +38,7 @@ struct linear_to_areal using point_type = typename std::conditional < - std::is_same::type, most_precise_type>::value, + std::is_same, most_precise_type>::value, point_type_t, point_type_t >::type; @@ -141,7 +141,7 @@ struct areal_to_areal using point_type = typename std::conditional < - std::is_same::type, most_precise_type>::value, + std::is_same, most_precise_type>::value, point_type_t, point_type_t >::type; diff --git a/include/boost/geometry/algorithms/detail/convert_indexed_to_indexed.hpp b/include/boost/geometry/algorithms/detail/convert_indexed_to_indexed.hpp index 607fdae00..0d0b1f508 100644 --- a/include/boost/geometry/algorithms/detail/convert_indexed_to_indexed.hpp +++ b/include/boost/geometry/algorithms/detail/convert_indexed_to_indexed.hpp @@ -42,7 +42,7 @@ struct indexed_to_indexed { static inline void apply(Source const& source, Destination& destination) { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = coordinate_type_t; geometry::set(destination, util::numeric_cast( diff --git a/include/boost/geometry/algorithms/detail/convert_point_to_point.hpp b/include/boost/geometry/algorithms/detail/convert_point_to_point.hpp index a29ca3fcf..dc8b0a7fb 100644 --- a/include/boost/geometry/algorithms/detail/convert_point_to_point.hpp +++ b/include/boost/geometry/algorithms/detail/convert_point_to_point.hpp @@ -43,7 +43,7 @@ struct point_to_point { static inline void apply(Source const& source, Destination& destination) { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = coordinate_type_t; set(destination, util::numeric_cast(get(source))); point_to_point::apply(source, destination); diff --git a/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp b/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp index ff8c1703b..905fd5dcb 100644 --- a/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp +++ b/include/boost/geometry/algorithms/detail/convex_hull/interface.hpp @@ -258,7 +258,7 @@ struct convex_hull { // Assuming that single point_type is used by the GeometryCollection using subgeometry_type = typename detail::first_geometry_type::type; - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; using ring_type = model::ring; // Calculate box rings once diff --git a/include/boost/geometry/algorithms/detail/direction_code.hpp b/include/boost/geometry/algorithms/detail/direction_code.hpp index ece34f15b..d256d2334 100644 --- a/include/boost/geometry/algorithms/detail/direction_code.hpp +++ b/include/boost/geometry/algorithms/detail/direction_code.hpp @@ -105,9 +105,9 @@ struct direction_code_impl units_sa_t, units_p_t); } - using coor_sa_t = typename coordinate_type::type; - using coor_sb_t = typename coordinate_type::type; - using coor_p_t = typename coordinate_type::type; + using coor_sa_t = coordinate_type_t; + using coor_sb_t = coordinate_type_t; + using coor_p_t = coordinate_type_t; // Declare unit type (equal for all types) and calc type (coerced to most precise) using units_t = typename cs_angular_units::type; @@ -211,12 +211,12 @@ struct direction_code_impl { using constants_sa_t = math::detail::constants_on_spheroid < - typename coordinate_type::type, + coordinate_type_t, typename cs_angular_units::type >; using constants_p_t = math::detail::constants_on_spheroid < - typename coordinate_type::type, + coordinate_type_t, typename cs_angular_units::type >; diff --git a/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp b/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp index 880e50378..921fdcfcb 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/areal_areal.hpp @@ -48,7 +48,7 @@ inline bool point_on_border_covered_by(Geometry1 const& geometry1, Geometry2 const& geometry2, Strategy const& strategy) { - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; typename helper_geometry::type pt; return geometry::point_on_border(pt, geometry1) && geometry::covered_by(pt, geometry2, strategy); diff --git a/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp b/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp index dbe23010d..fb47bca16 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/linear_linear.hpp @@ -90,12 +90,9 @@ struct disjoint_linear Geometry2 const& geometry2, Strategy const& strategy) { - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; using mutable_point_type = typename helper_geometry::type; - using ratio_type = geometry::segment_ratio - < - typename coordinate_type::type - > ; + using ratio_type = geometry::segment_ratio>; using turn_info_type = overlay::turn_info < mutable_point_type, diff --git a/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp b/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp index d959619c0..8fed7a926 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp @@ -131,17 +131,17 @@ struct disjoint_segment_box_sphere_or_spheroid // Case 2: disjoint if bounding boxes are disjoint - typedef typename coordinate_type::type CT; + using coor_t = coordinate_type_t; segment_point_type p0_normalized; NormalizeStrategy::apply(p0, p0_normalized); segment_point_type p1_normalized; NormalizeStrategy::apply(p1, p1_normalized); - CT lon1 = geometry::get_as_radian<0>(p0_normalized); - CT lat1 = geometry::get_as_radian<1>(p0_normalized); - CT lon2 = geometry::get_as_radian<0>(p1_normalized); - CT lat2 = geometry::get_as_radian<1>(p1_normalized); + coor_t lon1 = geometry::get_as_radian<0>(p0_normalized); + coor_t lat1 = geometry::get_as_radian<1>(p0_normalized); + coor_t lon2 = geometry::get_as_radian<0>(p1_normalized); + coor_t lat2 = geometry::get_as_radian<1>(p1_normalized); if (lon1 > lon2) { @@ -166,12 +166,12 @@ struct disjoint_segment_box_sphere_or_spheroid // Case 3: test intersection by comparing angles - CT alp1, a_b0, a_b1, a_b2, a_b3; + coor_t alp1, a_b0, a_b1, a_b2, a_b3; - CT b_lon_min = geometry::get_as_radian(box); - CT b_lat_min = geometry::get_as_radian(box); - CT b_lon_max = geometry::get_as_radian(box); - CT b_lat_max = geometry::get_as_radian(box); + coor_t b_lon_min = geometry::get_as_radian(box); + coor_t b_lat_min = geometry::get_as_radian(box); + coor_t b_lon_max = geometry::get_as_radian(box); + coor_t b_lat_max = geometry::get_as_radian(box); azimuth_strategy.apply(lon1, lat1, lon2, lat2, alp1); azimuth_strategy.apply(lon1, lat1, b_lon_min, b_lat_min, a_b0); @@ -212,12 +212,12 @@ struct disjoint_segment_box_sphere_or_spheroid // points of the box are above (below) the segment in northern (southern) // hemisphere. Then we have to compute the vertex of the segment - CT vertex_lat; + coor_t vertex_lat; if ((lat1 < b_lat_min && vertex_north) || (lat1 > b_lat_max && !vertex_north)) { - CT b_lat_below; //latitude of box closest to equator + coor_t b_lat_below; //latitude of box closest to equator if (vertex_north) { @@ -230,7 +230,7 @@ struct disjoint_segment_box_sphere_or_spheroid //optimization TODO: computing the spherical longitude should suffice for // the majority of cases - CT vertex_lon = geometry::formula::vertex_longitude + coor_t vertex_lon = geometry::formula::vertex_longitude ::apply(lon1, lat1, lon2, lat2, vertex_lat, diff --git a/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp b/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp index c3d079eb7..6094bb25b 100644 --- a/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp +++ b/include/boost/geometry/algorithms/detail/distance/geometry_collection.hpp @@ -68,9 +68,9 @@ inline auto collection_to_collection(GeometryCollection1 const& collection1, { using result_t = typename geometry::distance_result::type; - using point1_t = typename geometry::point_type::type; + using point1_t = geometry::point_type_t; using box1_t = model::box; - using point2_t = typename geometry::point_type::type; + using point2_t = geometry::point_type_t; using box2_t = model::box; using rtree_value_t = std::pair::type>; diff --git a/include/boost/geometry/algorithms/detail/envelope/initialize.hpp b/include/boost/geometry/algorithms/detail/envelope/initialize.hpp index 8d8342661..39e64c729 100644 --- a/include/boost/geometry/algorithms/detail/envelope/initialize.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/initialize.hpp @@ -62,7 +62,7 @@ template > struct initialize { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = coordinate_type_t; static inline void apply(Box& box, coordinate_type min_value diff --git a/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp b/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp index 2fa922705..28aedbb3e 100644 --- a/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp @@ -229,9 +229,9 @@ struct envelope_range_of_boxes { // boxes in the range are assumed to be normalized already - typedef typename boost::range_value::type box_type; - typedef typename coordinate_type::type coordinate_type; - typedef typename detail::cs_angular_units::type units_type; + using box_type = typename boost::range_value::type; + using coordinate_type = coordinate_type_t; + using units_type = typename detail::cs_angular_units::type; static const bool is_equatorial = ! std::is_same < @@ -239,13 +239,13 @@ struct envelope_range_of_boxes spherical_polar_tag >::value; - typedef math::detail::constants_on_spheroid + using constants = math::detail::constants_on_spheroid < coordinate_type, units_type, is_equatorial - > constants; + >; - typedef longitude_interval interval_type; - typedef std::vector interval_range_type; + using interval_type = longitude_interval; + using interval_range_type = std::vector; BOOST_GEOMETRY_ASSERT(! boost::empty(range_of_boxes)); diff --git a/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp b/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp index 952bf2215..e9b250252 100644 --- a/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp +++ b/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp @@ -250,7 +250,7 @@ struct collected_vector_polar private: static base_point_type to_equatorial(Point const& p) { - using coord_type = typename coordinate_type::type; + using coord_type = coordinate_type_t; using constants = math::detail::constants_on_spheroid < coord_type, diff --git a/include/boost/geometry/algorithms/detail/equals/implementation.hpp b/include/boost/geometry/algorithms/detail/equals/implementation.hpp index 2f803f365..bf3081a13 100644 --- a/include/boost/geometry/algorithms/detail/equals/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/equals/implementation.hpp @@ -215,7 +215,7 @@ struct equals_by_collection >::template type < calculation_type, - typename geometry::point_type::type + geometry::point_type_t >; std::vector c1, c2; diff --git a/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp b/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp index ae07f5bb0..9efa61c07 100644 --- a/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp +++ b/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp @@ -41,7 +41,7 @@ struct corner_by_epsilon { static inline void apply(Point & point) { - typedef typename coordinate_type::type coord_type; + using coord_type = coordinate_type_t; coord_type const coord = get(point); coord_type const seps = math::scaled_epsilon(coord); @@ -51,9 +51,9 @@ struct corner_by_epsilon } static inline void apply(Point & point, - typename coordinate_type::type const& eps) + coordinate_type_t const& eps) { - typedef typename coordinate_type::type coord_type; + using coord_type = coordinate_type_t; coord_type const coord = get(point); coord_type const seps = math::scaled_epsilon(coord, eps); @@ -72,13 +72,13 @@ template struct corner_by_epsilon { static inline void apply(Point const&) {} - static inline void apply(Point const&, typename coordinate_type::type const&) {} + static inline void apply(Point const&, coordinate_type_t const&) {} }; template < typename Box, - bool Enable = ! std::is_integral::type>::value + bool Enable = ! std::is_integral>::value > struct expand_by_epsilon { @@ -94,7 +94,7 @@ struct expand_by_epsilon } static inline void apply(Box & box, - typename coordinate_type::type const& eps) + coordinate_type_t const& eps) { typedef detail::indexed_point_view min_type; min_type min_point(box); @@ -110,7 +110,7 @@ template struct expand_by_epsilon { static inline void apply(Box &) {} - static inline void apply(Box &, typename coordinate_type::type const&) {} + static inline void apply(Box &, coordinate_type_t const&) {} }; } // namespace expand @@ -122,8 +122,7 @@ inline void expand_by_epsilon(Box & box) } template -inline void expand_by_epsilon(Box & box, - typename coordinate_type::type const& eps) +inline void expand_by_epsilon(Box & box, coordinate_type_t const& eps) { expand::expand_by_epsilon::apply(box, eps); } diff --git a/include/boost/geometry/algorithms/detail/extreme_points.hpp b/include/boost/geometry/algorithms/detail/extreme_points.hpp index f3845c920..55d533965 100644 --- a/include/boost/geometry/algorithms/detail/extreme_points.hpp +++ b/include/boost/geometry/algorithms/detail/extreme_points.hpp @@ -122,8 +122,8 @@ template struct extreme_points_on_ring { - typedef typename geometry::coordinate_type::type coordinate_type; - typedef typename geometry::point_type::type point_type; + using coordinate_type = geometry::coordinate_type_t; + using point_type = geometry::point_type_t; template static inline bool extend(CirclingIterator& it, diff --git a/include/boost/geometry/algorithms/detail/gc_make_rtree.hpp b/include/boost/geometry/algorithms/detail/gc_make_rtree.hpp index c1c00d469..db66aaf81 100644 --- a/include/boost/geometry/algorithms/detail/gc_make_rtree.hpp +++ b/include/boost/geometry/algorithms/detail/gc_make_rtree.hpp @@ -37,7 +37,7 @@ using gc_make_rtree_box_t = geometry::model::box < geometry::model::point < - typename geometry::coordinate_type::type, + geometry::coordinate_type_t, geometry::dimension::value, typename geometry::coordinate_system::type > diff --git a/include/boost/geometry/algorithms/detail/get_max_size.hpp b/include/boost/geometry/algorithms/detail/get_max_size.hpp index f4741824a..2397b552d 100644 --- a/include/boost/geometry/algorithms/detail/get_max_size.hpp +++ b/include/boost/geometry/algorithms/detail/get_max_size.hpp @@ -33,9 +33,9 @@ namespace detail template struct get_max_size_box { - static inline typename coordinate_type::type apply(Box const& box) + static inline coordinate_type_t apply(Box const& box) { - typename coordinate_type::type s + coordinate_type_t s = geometry::math::abs(geometry::get<1, Dimension>(box) - geometry::get<0, Dimension>(box)); return (std::max)(s, get_max_size_box::apply(box)); @@ -45,7 +45,7 @@ struct get_max_size_box template struct get_max_size_box { - static inline typename coordinate_type::type apply(Box const& box) + static inline coordinate_type_t apply(Box const& box) { return geometry::math::abs(geometry::get<1, 0>(box) - geometry::get<0, 0>(box)); } @@ -54,7 +54,7 @@ struct get_max_size_box // This might be implemented later on for other geometries too. // Not dispatched yet. template -inline typename coordinate_type::type get_max_size(Box const& box) +inline coordinate_type_t get_max_size(Box const& box) { return get_max_size_box::value - 1>::apply(box); } diff --git a/include/boost/geometry/algorithms/detail/intersects/implementation.hpp b/include/boost/geometry/algorithms/detail/intersects/implementation.hpp index 36f57fe6a..cee1af9c0 100644 --- a/include/boost/geometry/algorithms/detail/intersects/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/intersects/implementation.hpp @@ -46,20 +46,20 @@ struct self_intersects { concepts::check(); - typedef typename geometry::point_type::type point_type; - typedef typename strategies::relate::services::default_strategy + using point_type = geometry::point_type_t; + using strategy_type = typename strategies::relate::services::default_strategy < Geometry, Geometry - >::type strategy_type; + >::type; - typedef detail::overlay::turn_info turn_info; + using turn_info = detail::overlay::turn_info; std::deque turns; - typedef detail::overlay::get_turn_info + using turn_policy = detail::overlay::get_turn_info < detail::overlay::assign_null_policy - > turn_policy; + >; strategy_type strategy; diff --git a/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp b/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp index 82a1f5f4c..222870672 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/has_invalid_coordinate.hpp @@ -109,7 +109,7 @@ template typename Tag = typename tag::type, bool HasFloatingPointCoordinates = std::is_floating_point < - typename coordinate_type::type + coordinate_type_t >::value > struct has_invalid_coordinate diff --git a/include/boost/geometry/algorithms/detail/overlaps/implementation.hpp b/include/boost/geometry/algorithms/detail/overlaps/implementation.hpp index 5ab1b6ba7..d40b324c6 100644 --- a/include/boost/geometry/algorithms/detail/overlaps/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/overlaps/implementation.hpp @@ -59,8 +59,8 @@ struct box_box_loop { assert_dimension_equal(); - typedef typename coordinate_type::type coordinate_type1; - typedef typename coordinate_type::type coordinate_type2; + using coordinate_type1 = coordinate_type_t; + using coordinate_type2 = coordinate_type_t; coordinate_type1 const& min1 = get(b1); coordinate_type1 const& max1 = get(b1); diff --git a/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp b/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp index e598dcfef..e1b56bf47 100644 --- a/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp @@ -99,8 +99,8 @@ public: inline bool clip_segment(Box const& b, segment_type& s, bool& sp1_clipped, bool& sp2_clipped) const { - typedef typename select_coordinate_type::type coordinate_type; - typedef typename select_most_precise::type calc_type; + using coordinate_type = typename select_coordinate_type::type; + using calc_type = typename select_most_precise::type; calc_type t1 = 0; calc_type t2 = 1; diff --git a/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp b/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp index 6d04f0a09..99742f2a6 100644 --- a/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/colocate_clusters.hpp @@ -25,7 +25,7 @@ namespace detail { namespace overlay template < typename Point, - typename CoordinateType = typename geometry::coordinate_type::type, + typename CoordinateType = geometry::coordinate_type_t, typename CsTag = typename geometry::cs_tag::type, bool IsIntegral = std::is_integral::value > diff --git a/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp b/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp index 40eb0ed5a..5f8cc67dd 100644 --- a/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/enrich_intersection_points.hpp @@ -318,12 +318,11 @@ inline void create_map(Turns const& turns, MappedVector& mapped_vector, } template -inline typename geometry::coordinate_type::type - distance_measure(Point1 const& a, Point2 const& b) +inline geometry::coordinate_type_t distance_measure(Point1 const& a, Point2 const& b) { // TODO: use comparable distance for point-point instead - but that // causes currently cycling include problems - using ctype = typename geometry::coordinate_type::type; + using ctype = geometry::coordinate_type_t; ctype const dx = get<0>(a) - get<0>(b); ctype const dy = get<1>(a) - get<1>(b); return dx * dx + dy * dy; diff --git a/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp b/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp index 783acc847..3a859c4f0 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_clusters.hpp @@ -40,7 +40,7 @@ public: template static inline bool equals(P const& p1, P const& p2) { - using coor_t = typename coordinate_type

::type; + using coor_t = coordinate_type_t

; static auto const tolerance = common_approximately_equals_epsilon_multiplier::value(); return approximately_equals(p1, p2, tolerance); @@ -101,7 +101,7 @@ inline void get_clusters(Turns& turns, Clusters& clusters) sweep_equal_policy < - std::is_integral::type>::value + std::is_integral>::value > equal_policy; std::vector> points; diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp index 4dd823f96..ed1085e6e 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -216,7 +216,7 @@ struct turn_info_verification_functions BOOST_GEOMETRY_ASSERT(index_p > 0 && index_p <= 2); BOOST_GEOMETRY_ASSERT(index_q > 0 && index_q <= 2); - using distance_measure_result_type = typename geometry::coordinate_type::type; + using distance_measure_result_type = geometry::coordinate_type_t; bool const p_in_range = index_p < range_p.size(); bool const q_in_range = index_q < range_q.size(); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp index b8cb1ea01..787a9a91c 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp @@ -390,8 +390,8 @@ public : private : - typedef typename geometry::point_type::type point1_type; - typedef typename geometry::point_type::type point2_type; + using point1_type = geometry::point_type_t; + using point2_type = geometry::point_type_t; // It is NOT possible to have section-iterators here // because of the logistics of "index" (the section-iterator automatically @@ -540,9 +540,9 @@ template > struct get_turns_cs { - typedef typename geometry::point_type::type range_point_type; - typedef typename geometry::point_type::type box_point_type; - typedef std::array box_array; + using range_point_type = geometry::point_type_t; + using box_point_type = geometry::point_type_t; + using box_array = std::array; using view_type = detail::closed_clockwise_view < diff --git a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp index 1dbd717ae..510bfe29f 100644 --- a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp @@ -288,7 +288,7 @@ struct intersection_of_linestring_with_areal typedef geometry::segment_ratio < - typename coordinate_type::type + coordinate_type_t > ratio_type; typedef detail::overlay::turn_info @@ -419,9 +419,9 @@ struct intersection_linear_areal_point OutputIterator out, Strategy const& strategy) { - typedef geometry::segment_ratio::type> ratio_type; + using ratio_type = geometry::segment_ratio>; - typedef detail::overlay::turn_info + using turn_info = detail::overlay::turn_info < PointOut, ratio_type, @@ -430,12 +430,12 @@ struct intersection_linear_areal_point PointOut, ratio_type > - > turn_info; + >; - typedef detail::overlay::get_turn_info_linear_areal + using turn_policy = detail::overlay::get_turn_info_linear_areal < detail::overlay::assign_null_policy - > turn_policy; + >; std::vector turns; diff --git a/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp b/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp index 140c6aaf0..0a595f2f5 100644 --- a/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/less_by_segment_ratio.hpp @@ -88,7 +88,7 @@ private : Geometry2 const& m_geometry2; Strategy const& m_strategy; - typedef typename geometry::point_type::type point_type; + using point_type = geometry::point_type_t; inline bool default_order(Indexed const& left, Indexed const& right) const { diff --git a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp index 1d950306a..851f8706e 100644 --- a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp @@ -182,7 +182,7 @@ inline OutputIterator return_if_one_input_is_empty(Geometry1 const& geometry1, typedef ring_properties < - typename geometry::point_type::type, + geometry::point_type_t, typename geometry::area_result::type > properties; @@ -248,23 +248,23 @@ struct overlay >(geometry1, geometry2, out, strategy); } - typedef typename geometry::point_type::type point_type; - typedef detail::overlay::traversal_turn_info + using point_type = geometry::point_type_t; + using turn_info = detail::overlay::traversal_turn_info < point_type, typename segment_ratio_type::type - > turn_info; - typedef std::deque turn_container_type; + >; + using turn_container_type = std::deque; - typedef typename geometry::ring_type::type ring_type; - typedef std::deque ring_container_type; + using ring_type = typename geometry::ring_type::type; + using ring_container_type = std::deque; // Define the clusters, mapping cluster_id -> turns - typedef std::map + using cluster_type = std::map < signed_size_type, cluster_info - > cluster_type; + >; turn_container_type turns; diff --git a/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp b/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp index 5cfbae09b..e98101a13 100644 --- a/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp @@ -183,14 +183,14 @@ private: { item_visitor_type item_visitor(multipolygon, oit, strategy); - typedef geometry::model::point + using point_type = geometry::model::point < - typename geometry::coordinate_type::type, + geometry::coordinate_type_t, geometry::dimension::value, typename geometry::coordinate_system::type - > point_type; - typedef geometry::model::box box_type; - typedef std::pair box_pair; + >; + using box_type = geometry::model::box; + using box_pair = std::pair; std::vector box_pairs; box_pairs.reserve(boost::size(multipolygon)); diff --git a/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp b/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp index 4fd69411d..6eb07553f 100644 --- a/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp @@ -55,8 +55,8 @@ struct points_range template struct points_range { - typedef typename geometry::point_type::type point_type; - typedef const point_type * iterator_type; + using point_type = geometry::point_type_t; + using iterator_type = const point_type *; explicit points_range(Box const& box) { diff --git a/include/boost/geometry/algorithms/detail/overlay/segment_as_subrange.hpp b/include/boost/geometry/algorithms/detail/overlay/segment_as_subrange.hpp index 610d2e13e..98b44ed22 100644 --- a/include/boost/geometry/algorithms/detail/overlay/segment_as_subrange.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/segment_as_subrange.hpp @@ -34,7 +34,7 @@ struct segment_as_subrange geometry::set<1>(m_p2, geometry::get<1, 1>(m_segment)); } - typedef typename geometry::point_type::type point_type; + using point_type = geometry::point_type_t; point_type const& at(std::size_t index) const { diff --git a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp index 49c4357c2..d52c5c9e0 100644 --- a/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/self_turn_points.hpp @@ -131,13 +131,13 @@ struct get_turns InterruptPolicy& interrupt_policy, int source_index, bool skip_adjacent) { - typedef model::box::type> box_type; + using box_type = model::box>; // sectionalize in two dimensions to detect // all potential spikes correctly - typedef geometry::sections sections_type; + using sections_type = geometry::sections; - typedef std::integer_sequence dimensions; + using dimensions = std::integer_sequence; sections_type sec; geometry::sectionalize(geometry, diff --git a/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp b/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp index 14f32beed..5148fa2e4 100644 --- a/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/sort_by_side.hpp @@ -322,7 +322,7 @@ public : // Use the coordinate type, but if it is too small (e.g. std::int16), use a double using ct_type = typename geometry::select_most_precise < - typename geometry::coordinate_type::type, + geometry::coordinate_type_t, double >::type; diff --git a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp index e30668882..653f1930f 100644 --- a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp @@ -92,16 +92,16 @@ private : static const operation_type target_operation = operation_from_overlay::value; - typedef typename sort_by_side::side_compare::type side_compare_type; - typedef typename boost::range_value::type turn_type; - typedef typename turn_type::turn_operation_type turn_operation_type; + using side_compare_type = typename sort_by_side::side_compare::type; + using turn_type = typename boost::range_value::type; + using turn_operation_type = typename turn_type::turn_operation_type; - typedef typename geometry::point_type::type point_type; - typedef sort_by_side::side_sorter + using point_type = geometry::point_type_t; + using sbs_type = sort_by_side::side_sorter < Reverse1, Reverse2, OverlayType, point_type, Strategy, side_compare_type - > sbs_type; + >; public : inline traversal(Geometry1 const& geometry1, Geometry2 const& geometry2, diff --git a/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp index 8f1d22c8c..b2731346d 100644 --- a/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp @@ -57,7 +57,7 @@ struct turn_operation segment_identifier seg_id; SegmentRatio fraction; - typedef typename coordinate_type::type comparable_distance_type; + using comparable_distance_type = coordinate_type_t; comparable_distance_type remaining_distance; inline turn_operation() @@ -79,7 +79,7 @@ struct turn_operation template < typename Point, - typename SegmentRatio = geometry::segment_ratio::type>, + typename SegmentRatio = geometry::segment_ratio>, typename Operation = turn_operation, typename Container = std::array > diff --git a/include/boost/geometry/algorithms/detail/partition.hpp b/include/boost/geometry/algorithms/detail/partition.hpp index e3c4208e3..cfba85ff7 100644 --- a/include/boost/geometry/algorithms/detail/partition.hpp +++ b/include/boost/geometry/algorithms/detail/partition.hpp @@ -77,7 +77,7 @@ struct include_all_policy template inline void divide_box(Box const& box, Box& lower_box, Box& upper_box) { - using coor_t = typename coordinate_type::type; + using coor_t = coordinate_type_t; // Divide input box into two halves // either left/right (Dimension 0) diff --git a/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp b/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp index 3a2b30785..3d39a1c65 100644 --- a/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp @@ -89,7 +89,7 @@ public: return false; } - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; typename helper_geometry::type pt; bool const ok = geometry::point_on_border(pt, areal); diff --git a/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp b/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp index f0fa11d2a..d39e8299c 100644 --- a/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp +++ b/include/boost/geometry/algorithms/detail/relate/implementation_gc.hpp @@ -122,7 +122,7 @@ struct gc_gc typename traits::geometry_types::type, util::is_multi_polygon >::type; - using pt1_t = typename geometry::point_type::type; + using pt1_t = geometry::point_type_t; using mpt1_t = std::conditional_t < std::is_void::value, @@ -158,7 +158,7 @@ struct gc_gc typename traits::geometry_types::type, util::is_multi_polygon >::type; - using pt2_t = typename geometry::point_type::type; + using pt2_t = geometry::point_type_t; using mpt2_t = std::conditional_t < std::is_void::value, diff --git a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp index 1dfea7490..70b253f1c 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp @@ -172,7 +172,7 @@ public: // TODO: // handle empty/invalid geometries in a different way than below? - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; typename helper_geometry::type pt; bool const ok = geometry::point_on_border(pt, areal); diff --git a/include/boost/geometry/algorithms/detail/relate/point_point.hpp b/include/boost/geometry/algorithms/detail/relate/point_point.hpp index 1348c0dc6..6e4aeba45 100644 --- a/include/boost/geometry/algorithms/detail/relate/point_point.hpp +++ b/include/boost/geometry/algorithms/detail/relate/point_point.hpp @@ -224,8 +224,8 @@ struct multipoint_multipoint Result & result) { // sort points from the 1 MPt - typedef typename geometry::point_type::type point_type; - typedef geometry::less less_type; + using point_type = geometry::point_type_t; + using less_type = geometry::less; std::vector points(boost::begin(sorted_mpt), boost::end(sorted_mpt)); diff --git a/include/boost/geometry/algorithms/detail/relate/topology_check.hpp b/include/boost/geometry/algorithms/detail/relate/topology_check.hpp index 90f1ebd52..03d381f52 100644 --- a/include/boost/geometry/algorithms/detail/relate/topology_check.hpp +++ b/include/boost/geometry/algorithms/detail/relate/topology_check.hpp @@ -306,7 +306,7 @@ private: mutable bool m_has_interior; mutable bool m_has_boundary; - typedef typename geometry::point_type::type point_type; + using point_type = geometry::point_type_t; mutable std::vector m_endpoints; }; diff --git a/include/boost/geometry/algorithms/detail/relate/turns.hpp b/include/boost/geometry/algorithms/detail/relate/turns.hpp index 48661261a..6426d275c 100644 --- a/include/boost/geometry/algorithms/detail/relate/turns.hpp +++ b/include/boost/geometry/algorithms/detail/relate/turns.hpp @@ -54,7 +54,7 @@ struct get_turns { using turn_point_type = typename helper_geometry < - typename geometry::point_type::type + geometry::point_type_t >::type; template diff --git a/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp b/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp index 872f54668..880300894 100644 --- a/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp +++ b/include/boost/geometry/algorithms/detail/sections/sectionalize.hpp @@ -189,7 +189,7 @@ struct get_direction_loop static inline void apply(Segment const& seg, int directions[Count]) { - using coordinate_type = typename coordinate_type::type; + using coordinate_type = coordinate_type_t; using units_t = typename coordinate_system::type::units; coordinate_type const diff = math::longitude_distance_signed @@ -391,7 +391,7 @@ struct sectionalize_part { using section_type = typename boost::range_value::type; using box_type = typename section_type::box_type; - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; BOOST_STATIC_ASSERT ( @@ -713,7 +713,7 @@ inline void enlarge_sections(Sections& sections, Strategy const&) // but that somehow is not accepted by the NVCC (CUDA 12.4) compiler. using section_t = typename boost::range_value::type; using box_t = typename section_t::box_type; - using coor_t = typename geometry::coordinate_type::type; + using coor_t = geometry::coordinate_type_t; static auto const eps = math::scaled_epsilon(1000); diff --git a/include/boost/geometry/algorithms/detail/touches/implementation.hpp b/include/boost/geometry/algorithms/detail/touches/implementation.hpp index 515f827dd..c966863a0 100644 --- a/include/boost/geometry/algorithms/detail/touches/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/touches/implementation.hpp @@ -65,8 +65,8 @@ struct box_box_loop template static inline bool apply(Box1 const& b1, Box2 const& b2, bool & touch) { - typedef typename coordinate_type::type coordinate_type1; - typedef typename coordinate_type::type coordinate_type2; + using coordinate_type1 = coordinate_type_t; + using coordinate_type2 = coordinate_type_t; coordinate_type1 const& min1 = get(b1); coordinate_type1 const& max1 = get(b1); @@ -217,7 +217,7 @@ inline bool point_on_border_within(Geometry1 const& geometry1, Geometry2 const& geometry2, Strategy const& strategy) { - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; typename helper_geometry::type pt; return geometry::point_on_border(pt, geometry1) && geometry::within(pt, geometry2, strategy); @@ -242,7 +242,7 @@ struct areal_areal Geometry2 const& geometry2, Strategy const& strategy) { - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; using mutable_point_type = typename helper_geometry::type; using turn_info = detail::overlay::turn_info; @@ -505,17 +505,17 @@ struct self_touches { concepts::check(); - typedef typename strategies::relate::services::default_strategy + using strategy_type = typename strategies::relate::services::default_strategy < Geometry, Geometry - >::type strategy_type; - typedef typename geometry::point_type::type point_type; - typedef detail::overlay::turn_info turn_info; + >::type; + using point_type = geometry::point_type_t; + using turn_info = detail::overlay::turn_info; - typedef detail::overlay::get_turn_info + using policy_type = detail::overlay::get_turn_info < detail::overlay::assign_null_policy - > policy_type; + >; std::deque turns; detail::touches::areal_interrupt_policy policy; 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 459e54ec8..356411dac 100644 --- a/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp @@ -94,7 +94,7 @@ struct point_in_geometry template static inline int apply(Point const& point, Segment const& segment, Strategy const& strategy) { - typedef typename geometry::point_type::type point_type; + using point_type = geometry::point_type_t; point_type p0, p1; // TODO: don't copy points detail::assign_point_from_index<0>(segment, p0); diff --git a/include/boost/geometry/algorithms/merge_elements.hpp b/include/boost/geometry/algorithms/merge_elements.hpp index 76c1cf63b..83ea5ca95 100644 --- a/include/boost/geometry/algorithms/merge_elements.hpp +++ b/include/boost/geometry/algorithms/merge_elements.hpp @@ -66,7 +66,7 @@ template > inline void distribute_element(Geometry const& geometry, It it, PointLike& , Linear&, Areal& areal) { - typename geometry::point_type::type point; + geometry::point_type_t point; if (geometry::point_on_border(point, geometry)) { using point_t = typename Areal::value_type::first_type; @@ -81,7 +81,7 @@ template > inline void distribute_element(Geometry const& geometry, It it, PointLike& , Linear& linear, Areal& ) { - typename geometry::point_type::type point; + geometry::point_type_t point; if (geometry::point_on_border(point, geometry)) { using point_t = typename Linear::value_type::first_type; @@ -96,7 +96,7 @@ template > inline void distribute_element(Geometry const& geometry, It it, PointLike& pointlike, Linear& , Areal& ) { - typename geometry::point_type::type point; + geometry::point_type_t point; if (geometry::point_on_border(point, geometry)) { using point_t = typename Linear::value_type::first_type; @@ -268,11 +268,11 @@ struct merge_gc GeometryCollection & out, Strategy const& strategy) { - using original_point_t = typename geometry::point_type::type; + using original_point_t = geometry::point_type_t; using iterator_t = typename boost::range_iterator::type; - using coordinate_t = typename geometry::coordinate_type::type; + using coor_t = geometry::coordinate_type_t; using cs_t = typename geometry::coordinate_system::type; - using point_t = model::point; + using point_t = model::point; using multi_point_t = typename util::sequence_find_if < diff --git a/include/boost/geometry/algorithms/point_on_surface.hpp b/include/boost/geometry/algorithms/point_on_surface.hpp index 88077bcc2..55149d7d5 100644 --- a/include/boost/geometry/algorithms/point_on_surface.hpp +++ b/include/boost/geometry/algorithms/point_on_surface.hpp @@ -146,7 +146,7 @@ struct min_of_intruder template inline void calculate_average(Point& point, std::vector

const& points) { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; coordinate_type x = 0; coordinate_type y = 0; @@ -237,8 +237,8 @@ template ::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; std::vector extremes; typedef std::vector > intruders_type; @@ -327,10 +327,10 @@ inline void point_on_surface(Geometry const& geometry, Point & point) \return The Point guaranteed to lie on the surface of the Geometry */ template -inline typename geometry::point_type::type +inline geometry::point_type_t return_point_on_surface(Geometry const& geometry, SideStrategy const& strategy) { - typename geometry::point_type::type result; + geometry::point_type_t result; geometry::point_on_surface(geometry, result, strategy); return result; } @@ -342,10 +342,10 @@ return_point_on_surface(Geometry const& geometry, SideStrategy const& strategy) \return The Point guaranteed to lie on the surface of the Geometry */ template -inline typename geometry::point_type::type +inline geometry::point_type_t return_point_on_surface(Geometry const& geometry) { - typename geometry::point_type::type result; + geometry::point_type_t result; geometry::point_on_surface(geometry, result); return result; } diff --git a/include/boost/geometry/algorithms/simplify.hpp b/include/boost/geometry/algorithms/simplify.hpp index 28a3a5582..c73bd7d73 100644 --- a/include/boost/geometry/algorithms/simplify.hpp +++ b/include/boost/geometry/algorithms/simplify.hpp @@ -393,7 +393,7 @@ private : auto const cdistance_strategy = strategies::distance::detail::make_comparable(strategies) .distance(detail::dummy_point(), detail::dummy_point()); - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; using cdistance_type = decltype(cdistance_strategy.apply( std::declval(), std::declval())); @@ -444,7 +444,7 @@ public : // Rotate it into a copied vector // (vector, because source type might not support rotation) // (duplicate end point will be simplified away) - typedef typename geometry::point_type::type point_type; + using point_type = geometry::point_type_t; std::vector rotated; rotated.reserve(size + 1); // 1 because open rings are closed diff --git a/include/boost/geometry/algorithms/transform.hpp b/include/boost/geometry/algorithms/transform.hpp index 8b7e814ec..65491620c 100644 --- a/include/boost/geometry/algorithms/transform.hpp +++ b/include/boost/geometry/algorithms/transform.hpp @@ -84,10 +84,10 @@ struct transform_box { // Create a valid box and therefore swap if necessary using coordinate_type = coordinate_type_t; - coordinate_type x1 = geometry::get<0>(p1) - , y1 = geometry::get<1>(p1) - , x2 = geometry::get<0>(p2) - , y2 = geometry::get<1>(p2); + coordinate_type x1 = geometry::get<0>(p1); + coordinate_type y1 = geometry::get<1>(p1); + coordinate_type x2 = geometry::get<0>(p2); + coordinate_type y2 = geometry::get<1>(p2); if (x1 > x2) { std::swap(x1, x2); } if (y1 > y2) { std::swap(y1, y2); } diff --git a/include/boost/geometry/algorithms/unique.hpp b/include/boost/geometry/algorithms/unique.hpp index 618087e14..c868e5d24 100644 --- a/include/boost/geometry/algorithms/unique.hpp +++ b/include/boost/geometry/algorithms/unique.hpp @@ -167,10 +167,10 @@ inline void unique(Geometry& geometry) concepts::check(); // Default strategy is the default point-comparison policy - typedef geometry::equal_to + using policy = geometry::equal_to < - typename geometry::point_type::type - > policy; + geometry::point_type_t + >; dispatch::unique::apply(geometry, policy()); diff --git a/include/boost/geometry/arithmetic/arithmetic.hpp b/include/boost/geometry/arithmetic/arithmetic.hpp index b88bd5cce..d25b0cdc9 100644 --- a/include/boost/geometry/arithmetic/arithmetic.hpp +++ b/include/boost/geometry/arithmetic/arithmetic.hpp @@ -41,7 +41,7 @@ namespace boost { namespace geometry \param value value to add */ template -inline void add_value(Point& p, typename coordinate_type::type const& value) +inline void add_value(Point& p, coordinate_type_t const& value) { BOOST_CONCEPT_ASSERT( (concepts::Point) ); @@ -83,7 +83,7 @@ inline void add_point(Point1& p1, Point2 const& p2) \param value value to subtract */ template -inline void subtract_value(Point& p, typename coordinate_type::type const& value) +inline void subtract_value(Point& p, coordinate_type_t const& value) { BOOST_CONCEPT_ASSERT( (concepts::Point) ); @@ -125,7 +125,7 @@ inline void subtract_point(Point1& p1, Point2 const& p2) \param value value to multiply by */ template -inline void multiply_value(Point& p, typename coordinate_type::type const& value) +inline void multiply_value(Point& p, coordinate_type_t const& value) { BOOST_CONCEPT_ASSERT( (concepts::Point) ); @@ -168,7 +168,7 @@ inline void multiply_point(Point1& p1, Point2 const& p2) \param value value to divide by */ template -inline void divide_value(Point& p, typename coordinate_type::type const& value) +inline void divide_value(Point& p, coordinate_type_t const& value) { BOOST_CONCEPT_ASSERT( (concepts::Point) ); @@ -210,7 +210,7 @@ inline void divide_point(Point1& p1, Point2 const& p2) \param value value to assign */ template -inline void assign_value(Point& p, typename coordinate_type::type const& value) +inline void assign_value(Point& p, coordinate_type_t const& value) { BOOST_CONCEPT_ASSERT( (concepts::Point) ); diff --git a/include/boost/geometry/arithmetic/determinant.hpp b/include/boost/geometry/arithmetic/determinant.hpp index 63974a9ea..ada0c5014 100644 --- a/include/boost/geometry/arithmetic/determinant.hpp +++ b/include/boost/geometry/arithmetic/determinant.hpp @@ -65,8 +65,8 @@ inline ReturnType determinant(U const& u, V const& v) return calculate_determinant < ReturnType, - typename geometry::coordinate_type::type, - typename geometry::coordinate_type::type + geometry::coordinate_type_t, + geometry::coordinate_type_t >::apply(get<0>(u), get<1>(u), get<0>(v), get<1>(v)); } diff --git a/include/boost/geometry/arithmetic/infinite_line_functions.hpp b/include/boost/geometry/arithmetic/infinite_line_functions.hpp index 16acb866c..15c6eecbf 100644 --- a/include/boost/geometry/arithmetic/infinite_line_functions.hpp +++ b/include/boost/geometry/arithmetic/infinite_line_functions.hpp @@ -89,7 +89,7 @@ inline typename select_most_precise < Type, - typename geometry::coordinate_type::type + geometry::coordinate_type_t >::type side_value(model::infinite_line const& line, Point const& p) { diff --git a/include/boost/geometry/arithmetic/normalize.hpp b/include/boost/geometry/arithmetic/normalize.hpp index 64e08c2dc..c338293ba 100644 --- a/include/boost/geometry/arithmetic/normalize.hpp +++ b/include/boost/geometry/arithmetic/normalize.hpp @@ -26,22 +26,22 @@ namespace detail { template -inline typename coordinate_type::type vec_length_sqr(Point const& pt) +inline coordinate_type_t vec_length_sqr(Point const& pt) { return dot_product(pt, pt); } template -inline typename coordinate_type::type vec_length(Point const& pt) +inline coordinate_type_t vec_length(Point const& pt) { // NOTE: hypot() could be used instead of sqrt() return math::sqrt(dot_product(pt, pt)); } template -inline bool vec_normalize(Point & pt, typename coordinate_type::type & len) +inline bool vec_normalize(Point & pt, coordinate_type_t& len) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; coord_t const c0 = 0; len = vec_length(pt); @@ -58,7 +58,7 @@ inline bool vec_normalize(Point & pt, typename coordinate_type::type & le template inline bool vec_normalize(Point & pt) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; coord_t len; return vec_normalize(pt, len); } diff --git a/include/boost/geometry/core/coordinate_promotion.hpp b/include/boost/geometry/core/coordinate_promotion.hpp index efbcdff7d..1a66e6472 100644 --- a/include/boost/geometry/core/coordinate_promotion.hpp +++ b/include/boost/geometry/core/coordinate_promotion.hpp @@ -49,10 +49,10 @@ struct promote_floating_point template struct fp_coordinate_type { - typedef typename promote_floating_point + using type = typename promote_floating_point < - typename coordinate_type::type - >::type type; + coordinate_type_t + >::type; }; namespace detail diff --git a/include/boost/geometry/formulas/geographic.hpp b/include/boost/geometry/formulas/geographic.hpp index cc726876a..a8c0a369c 100644 --- a/include/boost/geometry/formulas/geographic.hpp +++ b/include/boost/geometry/formulas/geographic.hpp @@ -35,7 +35,7 @@ namespace formula { template inline Point3d geo_to_cart3d(PointGeo const& point_geo, Spheroid const& spheroid) { - typedef typename coordinate_type::type calc_t; + using calc_t = coordinate_type_t; calc_t const c1 = 1; calc_t const e_sqr = eccentricity_sqr(spheroid); @@ -61,7 +61,7 @@ inline Point3d geo_to_cart3d(PointGeo const& point_geo, Spheroid const& spheroid template inline void geo_to_cart3d(PointGeo const& point_geo, Point3d & result, Point3d & north, Point3d & east, Spheroid const& spheroid) { - typedef typename coordinate_type::type calc_t; + using calc_t = coordinate_type_t; calc_t const c1 = 1; calc_t const e_sqr = eccentricity_sqr(spheroid); @@ -94,8 +94,8 @@ inline void geo_to_cart3d(PointGeo const& point_geo, Point3d & result, Point3d & template inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; - typedef typename coordinate_type::type calc_t; + using coord_t = coordinate_type_t; + using calc_t = coordinate_type_t; calc_t const c1 = 1; //calc_t const c2 = 2; @@ -141,7 +141,7 @@ inline PointGeo cart3d_to_geo(Point3d const& point_3d, Spheroid const& spheroid) template inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; // len_xy = sqrt(x^2 + y^2) // r = len_xy - |z / tan(lat)| @@ -167,7 +167,7 @@ inline Point3d projected_to_xy(Point3d const& point_3d, Spheroid const& spheroid template inline Point3d projected_to_surface(Point3d const& direction, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; //coord_t const c0 = 0; coord_t const c2 = 2; @@ -206,7 +206,7 @@ inline bool projected_to_surface(Point3d const& origin, Point3d const& direction Point3d & result1, Point3d & result2, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; coord_t const c0 = 0; coord_t const c1 = 1; @@ -265,7 +265,7 @@ inline bool great_elliptic_intersection(Point3d const& a1, Point3d const& a2, Point3d & result, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; coord_t c0 = 0; coord_t c1 = 1; @@ -308,7 +308,7 @@ inline bool great_elliptic_intersection(Point3d const& a1, Point3d const& a2, template static inline int elliptic_side_value(Point3d1 const& origin, Point3d1 const& norm, Point3d2 const& pt) { - typedef typename coordinate_type::type calc_t; + using calc_t = coordinate_type_t; calc_t c0 = 0; // vector oposite to pt - origin @@ -330,7 +330,7 @@ inline bool planes_spheroid_intersection(Point3d const& o1, Point3d const& n1, Point3d & ip1, Point3d & ip2, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; coord_t c0 = 0; coord_t c1 = 1; @@ -381,7 +381,7 @@ inline void experimental_elliptic_plane(Point3d const& p1, Point3d const& p2, Point3d & origin, Point3d & normal, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; Point3d xy1 = projected_to_xy(p1, spheroid); Point3d xy2 = projected_to_xy(p2, spheroid); @@ -416,7 +416,7 @@ inline bool experimental_elliptic_intersection(Point3d const& a1, Point3d const& Point3d & result, Spheroid const& spheroid) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; coord_t c0 = 0; coord_t c1 = 1; diff --git a/include/boost/geometry/formulas/spherical.hpp b/include/boost/geometry/formulas/spherical.hpp index 3a388bfbc..8b26251ea 100644 --- a/include/boost/geometry/formulas/spherical.hpp +++ b/include/boost/geometry/formulas/spherical.hpp @@ -56,7 +56,7 @@ static inline void sph_to_cart3d(T const& lon, T const& lat, T & x, T & y, T & z template static inline Point3d sph_to_cart3d(PointSph const& point_sph) { - typedef typename coordinate_type::type calc_t; + using calc_t = coordinate_type_t; calc_t const lon = get_as_radian<0>(point_sph); calc_t const lat = get_as_radian<1>(point_sph); @@ -81,8 +81,8 @@ static inline void cart3d_to_sph(T const& x, T const& y, T const& z, T & lon, T template static inline PointSph cart3d_to_sph(Point3d const& point_3d) { - typedef typename coordinate_type::type coord_t; - typedef typename coordinate_type::type calc_t; + using coord_t = coordinate_type_t; + using calc_t = coordinate_type_t; calc_t const x = get<0>(point_3d); calc_t const y = get<1>(point_3d); diff --git a/include/boost/geometry/geometries/adapted/boost_fusion.hpp b/include/boost/geometry/geometries/adapted/boost_fusion.hpp index 85c823631..f80d9eb78 100644 --- a/include/boost/geometry/geometries/adapted/boost_fusion.hpp +++ b/include/boost/geometry/geometries/adapted/boost_fusion.hpp @@ -140,7 +140,7 @@ struct access > > { - typedef typename coordinate_type::type ctype; + using ctype = coordinate_type_t; static inline ctype get(Sequence const& point) { diff --git a/include/boost/geometry/geometries/adapted/std_pair_as_segment.hpp b/include/boost/geometry/geometries/adapted/std_pair_as_segment.hpp index e9200e0fd..a078af939 100644 --- a/include/boost/geometry/geometries/adapted/std_pair_as_segment.hpp +++ b/include/boost/geometry/geometries/adapted/std_pair_as_segment.hpp @@ -57,7 +57,7 @@ struct point_type > template struct indexed_access, 0, Dimension> { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(std::pair const& s) { @@ -74,7 +74,7 @@ struct indexed_access, 0, Dimension> template struct indexed_access, 1, Dimension> { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(std::pair const& s) { diff --git a/include/boost/geometry/geometries/box.hpp b/include/boost/geometry/geometries/box.hpp index d773129af..4c1d6eea7 100644 --- a/include/boost/geometry/geometries/box.hpp +++ b/include/boost/geometry/geometries/box.hpp @@ -204,7 +204,7 @@ struct point_type > template struct indexed_access, min_corner, Dimension> { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static constexpr coordinate_type get(model::box const& b) { @@ -220,7 +220,7 @@ struct indexed_access, min_corner, Dimension> template struct indexed_access, max_corner, Dimension> { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static constexpr coordinate_type get(model::box const& b) { diff --git a/include/boost/geometry/geometries/concepts/point_concept.hpp b/include/boost/geometry/geometries/concepts/point_concept.hpp index dbe004a58..64c9d3056 100644 --- a/include/boost/geometry/geometries/concepts/point_concept.hpp +++ b/include/boost/geometry/geometries/concepts/point_concept.hpp @@ -40,8 +40,8 @@ class Point { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = coordinate_type_t; + using csystem = typename coordinate_system::type; // The following enum is used to fully instantiate the coordinate // system class; this is needed in order to check the units passed @@ -93,7 +93,7 @@ class ConstPoint { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; + typedef coordinate_type_t ctype; typedef typename coordinate_system::type csystem; // The following enum is used to fully instantiate the coordinate diff --git a/include/boost/geometry/geometries/helper_geometry.hpp b/include/boost/geometry/geometries/helper_geometry.hpp index 6cade9723..3c96d344f 100644 --- a/include/boost/geometry/geometries/helper_geometry.hpp +++ b/include/boost/geometry/geometries/helper_geometry.hpp @@ -129,7 +129,7 @@ struct helper_geometry template < typename Geometry, - typename NewCoordinateType = typename coordinate_type::type, + typename NewCoordinateType = coordinate_type_t, typename NewUnits = typename detail::cs_angular_units::type > struct helper_geometry diff --git a/include/boost/geometry/geometries/pointing_segment.hpp b/include/boost/geometry/geometries/pointing_segment.hpp index fd7f110d2..669a73493 100644 --- a/include/boost/geometry/geometries/pointing_segment.hpp +++ b/include/boost/geometry/geometries/pointing_segment.hpp @@ -84,17 +84,14 @@ struct tag > template struct point_type > { - typedef Point type; + using type = Point; }; template struct indexed_access, 0, Dimension> { - typedef model::pointing_segment segment_type; - typedef typename geometry::coordinate_type - < - segment_type - >::type coordinate_type; + using segment_type = model::pointing_segment; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(segment_type const& s) { @@ -113,11 +110,8 @@ struct indexed_access, 0, Dimension> template struct indexed_access, 1, Dimension> { - typedef model::pointing_segment segment_type; - typedef typename geometry::coordinate_type - < - segment_type - >::type coordinate_type; + using segment_type = model::pointing_segment; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(segment_type const& s) { diff --git a/include/boost/geometry/geometries/register/box.hpp b/include/boost/geometry/geometries/register/box.hpp index 71a7077a6..23e07d1d8 100644 --- a/include/boost/geometry/geometries/register/box.hpp +++ b/include/boost/geometry/geometries/register/box.hpp @@ -23,7 +23,7 @@ template \ struct indexed_access \ { \ - typedef typename coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Box const& b) \ { return geometry::get(b. MinCorner); } \ static inline void set(Box& b, ct const& value) \ @@ -32,7 +32,7 @@ struct indexed_access \ template \ struct indexed_access \ { \ - typedef typename coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Box const& b) \ { return geometry::get(b. MaxCorner); } \ static inline void set(Box& b, ct const& value) \ @@ -44,7 +44,7 @@ struct indexed_access \ template \ struct indexed_access, min_corner, D> \ { \ - typedef typename coordinate_type

::type ct; \ + using ct = coordinate_type_t

; \ static inline ct get(Box

const& b) \ { return geometry::get(b. MinCorner); } \ static inline void set(Box

& b, ct const& value) \ @@ -53,7 +53,7 @@ struct indexed_access, min_corner, D> \ template \ struct indexed_access, max_corner, D> \ { \ - typedef typename coordinate_type

::type ct; \ + using ct = coordinate_type_t

; \ static inline ct get(Box

const& b) \ { return geometry::get(b. MaxCorner); } \ static inline void set(Box

& b, ct const& value) \ @@ -64,25 +64,25 @@ struct indexed_access, max_corner, D> \ #define BOOST_GEOMETRY_DETAIL_SPECIALIZE_BOX_ACCESS_4VALUES(Box, Point, Left, Bottom, Right, Top) \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Box const& b) { return b. Left; } \ static inline void set(Box& b, ct const& value) { b. Left = value; } \ }; \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Box const& b) { return b. Bottom; } \ static inline void set(Box& b, ct const& value) { b. Bottom = value; } \ }; \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Box const& b) { return b. Right; } \ static inline void set(Box& b, ct const& value) { b. Right = value; } \ }; \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Box const& b) { return b. Top; } \ static inline void set(Box& b, ct const& value) { b. Top = value; } \ }; diff --git a/include/boost/geometry/geometries/register/point.hpp b/include/boost/geometry/geometries/register/point.hpp index 95a8d521d..224a03941 100644 --- a/include/boost/geometry/geometries/register/point.hpp +++ b/include/boost/geometry/geometries/register/point.hpp @@ -31,10 +31,10 @@ // Starting point, specialize basic traits necessary to register a point #define BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_TRAITS(Point, Dim, CoordinateType, CoordinateSystem) \ - template<> struct tag { typedef point_tag type; }; \ + template<> struct tag { using type = point_tag; }; \ template<> struct dimension : std::integral_constant {}; \ - template<> struct coordinate_type { typedef CoordinateType type; }; \ - template<> struct coordinate_system { typedef CoordinateSystem type; }; + template<> struct coordinate_type { using type = CoordinateType; }; \ + template<> struct coordinate_system { using type = CoordinateSystem; }; // Specialize access class per dimension #define BOOST_GEOMETRY_DETAIL_SPECIALIZE_POINT_ACCESS(Point, Dim, CoordinateType, Get, Set) \ diff --git a/include/boost/geometry/geometries/register/segment.hpp b/include/boost/geometry/geometries/register/segment.hpp index 6ea88c091..f9e5c0695 100644 --- a/include/boost/geometry/geometries/register/segment.hpp +++ b/include/boost/geometry/geometries/register/segment.hpp @@ -23,7 +23,7 @@ template \ struct indexed_access \ { \ - typedef typename coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Segment const& b) \ { return geometry::get(b. Index0); } \ static inline void set(Segment& b, ct const& value) \ @@ -32,7 +32,7 @@ struct indexed_access \ template \ struct indexed_access \ { \ - typedef typename coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Segment const& b) \ { return geometry::get(b. Index1); } \ static inline void set(Segment& b, ct const& value) \ @@ -44,7 +44,7 @@ struct indexed_access \ template \ struct indexed_access, min_corner, D> \ { \ - typedef typename coordinate_type

::type ct; \ + using ct = coordinate_type_t

; \ static inline ct get(Segment

const& b) \ { return geometry::get(b. Index0); } \ static inline void set(Segment

& b, ct const& value) \ @@ -53,7 +53,7 @@ struct indexed_access, min_corner, D> \ template \ struct indexed_access, max_corner, D> \ { \ - typedef typename coordinate_type

::type ct; \ + using ct = coordinate_type_t

; \ static inline ct get(Segment

const& b) \ { return geometry::get(b. Index1); } \ static inline void set(Segment

& b, ct const& value) \ @@ -64,25 +64,25 @@ struct indexed_access, max_corner, D> \ #define BOOST_GEOMETRY_DETAIL_SPECIALIZE_SEGMENT_ACCESS_4VALUES(Segment, Point, Left, Bottom, Right, Top) \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Segment const& b) { return b. Left; } \ static inline void set(Segment& b, ct const& value) { b. Left = value; } \ }; \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Segment const& b) { return b. Bottom; } \ static inline void set(Segment& b, ct const& value) { b. Bottom = value; } \ }; \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Segment const& b) { return b. Right; } \ static inline void set(Segment& b, ct const& value) { b. Right = value; } \ }; \ template <> struct indexed_access \ { \ - typedef coordinate_type::type ct; \ + using ct = coordinate_type_t; \ static inline ct get(Segment const& b) { return b. Top; } \ static inline void set(Segment& b, ct const& value) { b. Top = value; } \ }; diff --git a/include/boost/geometry/geometries/segment.hpp b/include/boost/geometry/geometries/segment.hpp index 7195b8280..471f566a1 100644 --- a/include/boost/geometry/geometries/segment.hpp +++ b/include/boost/geometry/geometries/segment.hpp @@ -137,7 +137,7 @@ template struct indexed_access, 0, Dimension> { typedef model::segment segment_type; - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static constexpr coordinate_type get(segment_type const& s) { @@ -155,7 +155,7 @@ template struct indexed_access, 1, Dimension> { typedef model::segment segment_type; - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static constexpr coordinate_type get(segment_type const& s) { @@ -200,7 +200,7 @@ template struct indexed_access, 0, Dimension> { typedef model::referring_segment segment_type; - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(segment_type const& s) { @@ -218,7 +218,7 @@ template struct indexed_access, 1, Dimension> { typedef model::referring_segment segment_type; - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(segment_type const& s) { diff --git a/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp b/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp index 97553f7c3..823c12476 100644 --- a/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp +++ b/include/boost/geometry/index/detail/algorithms/comparable_distance_centroid.hpp @@ -49,8 +49,8 @@ struct sum_for_indexable_dimension::type point_coord_t; - typedef typename coordinate_type::type indexable_coord_t; + using point_coord_t = coordinate_type_t; + using indexable_coord_t = coordinate_type_t; point_coord_t pt_c = geometry::get(pt); indexable_coord_t ind_c_min = geometry::get(i); diff --git a/include/boost/geometry/index/detail/algorithms/comparable_distance_far.hpp b/include/boost/geometry/index/detail/algorithms/comparable_distance_far.hpp index 102ac545e..5efffad23 100644 --- a/include/boost/geometry/index/detail/algorithms/comparable_distance_far.hpp +++ b/include/boost/geometry/index/detail/algorithms/comparable_distance_far.hpp @@ -37,8 +37,8 @@ struct sum_for_indexable_dimension::type point_coord_t; - typedef typename coordinate_type::type indexable_coord_t; + using point_coord_t = coordinate_type_t; + using indexable_coord_t = coordinate_type; point_coord_t pt_c = geometry::get(pt); indexable_coord_t ind_c_min = geometry::get(i); diff --git a/include/boost/geometry/index/detail/algorithms/comparable_distance_near.hpp b/include/boost/geometry/index/detail/algorithms/comparable_distance_near.hpp index 4f2905f3a..c74c95760 100644 --- a/include/boost/geometry/index/detail/algorithms/comparable_distance_near.hpp +++ b/include/boost/geometry/index/detail/algorithms/comparable_distance_near.hpp @@ -44,12 +44,12 @@ template < size_t DimensionIndex> struct sum_for_indexable_dimension { - typedef typename geometry::default_comparable_distance_result::type result_type; + using result_type = typename geometry::default_comparable_distance_result::type; inline static result_type apply(Point const& pt, BoxIndexable const& i) { - typedef typename coordinate_type::type point_coord_t; - typedef typename coordinate_type::type indexable_coord_t; + using point_coord_t = coordinate_type_t; + using indexable_coord_t = coordinate_type_t; point_coord_t pt_c = geometry::get(pt); indexable_coord_t ind_c_min = geometry::get(i); diff --git a/include/boost/geometry/index/detail/algorithms/margin.hpp b/include/boost/geometry/index/detail/algorithms/margin.hpp index dc86a511e..53ba247be 100644 --- a/include/boost/geometry/index/detail/algorithms/margin.hpp +++ b/include/boost/geometry/index/detail/algorithms/margin.hpp @@ -34,7 +34,7 @@ struct default_margin_result { using type = typename select_most_precise < - typename coordinate_type::type, + coordinate_type_t, double >::type; }; diff --git a/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp b/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp index 2f28163a1..382b7196c 100644 --- a/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp +++ b/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp @@ -34,12 +34,12 @@ template < size_t DimensionIndex> struct smallest_for_indexable_dimension { - typedef typename geometry::default_comparable_distance_result::type result_type; + using result_type = typename geometry::default_comparable_distance_result::type; inline static result_type apply(Point const& pt, BoxIndexable const& i, result_type const& maxd) { - typedef typename coordinate_type::type point_coord_t; - typedef typename coordinate_type::type indexable_coord_t; + using point_coord_t = coordinate_type_t; + using indexable_coord_t = coordinate_type_t; point_coord_t pt_c = geometry::get(pt); indexable_coord_t ind_c_min = geometry::get(i); diff --git a/include/boost/geometry/index/detail/algorithms/segment_intersection.hpp b/include/boost/geometry/index/detail/algorithms/segment_intersection.hpp index 674d9f5f8..e8b256dfb 100644 --- a/include/boost/geometry/index/detail/algorithms/segment_intersection.hpp +++ b/include/boost/geometry/index/detail/algorithms/segment_intersection.hpp @@ -32,7 +32,7 @@ namespace boost { namespace geometry { namespace index { namespace detail { // typedef typename select_most_precise< // typename select_most_precise< // typename coordinate_type::type, -// typename coordinate_type::type +// coordinate_type_t // >::type, // float // TODO - use bigger type, calculated from the size of coordinate types // >::type type; diff --git a/include/boost/geometry/index/detail/bounded_view.hpp b/include/boost/geometry/index/detail/bounded_view.hpp index 1ba9f37f5..3436f8296 100644 --- a/include/boost/geometry/index/detail/bounded_view.hpp +++ b/include/boost/geometry/index/detail/bounded_view.hpp @@ -66,7 +66,7 @@ template struct bounded_view_base { public: - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; bounded_view_base(Segment const& segment, Strategy const& ) : m_segment(segment) @@ -95,7 +95,7 @@ private: template struct bounded_view_base { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; bounded_view_base(Segment const& segment, Strategy const& strategy) { @@ -124,7 +124,7 @@ template struct bounded_view_base { public: - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; bounded_view_base(BoxIn const& box, Strategy const& ) : m_box(box) @@ -154,7 +154,7 @@ template struct bounded_view_base { public: - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; bounded_view_base(Point const& point, Strategy const& ) : m_point(point) @@ -249,7 +249,7 @@ struct indexed_access { typedef index::detail::bounded_view box_type; - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(box_type const& b) { @@ -267,7 +267,7 @@ struct indexed_access { typedef index::detail::bounded_view box_type; - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get(box_type const& b) { diff --git a/include/boost/geometry/index/detail/rtree/pack_create.hpp b/include/boost/geometry/index/detail/rtree/pack_create.hpp index dab7cfdbd..ee517ca99 100644 --- a/include/boost/geometry/index/detail/rtree/pack_create.hpp +++ b/include/boost/geometry/index/detail/rtree/pack_create.hpp @@ -42,10 +42,10 @@ struct biggest_edge { BOOST_STATIC_ASSERT(0 < Dimension); template - static inline void apply(Box const& box, typename coordinate_type::type & length, std::size_t & dim_index) + static inline void apply(Box const& box, coordinate_type_t & length, std::size_t & dim_index) { biggest_edge::apply(box, length, dim_index); - typename coordinate_type::type curr + coordinate_type_t curr = geometry::get(box) - geometry::get(box); if ( length < curr ) { @@ -59,7 +59,7 @@ template <> struct biggest_edge<1> { template - static inline void apply(Box const& box, typename coordinate_type::type & length, std::size_t & dim_index) + static inline void apply(Box const& box, coordinate_type_t & length, std::size_t & dim_index) { dim_index = 0; length = geometry::get(box) - geometry::get(box); diff --git a/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp b/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp index 051337a27..2b7014597 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp @@ -39,10 +39,10 @@ struct gl_draw_point template struct gl_draw_point { - static inline void apply(Point const& p, typename coordinate_type::type z) + static inline void apply(Point const& p, coordinate_type_t z) { - typename coordinate_type::type const& x = geometry::get<0>(p); - typename coordinate_type::type const& y = geometry::get<1>(p); + coordinate_type_t const& x = geometry::get<0>(p); + coordinate_type_t const& y = geometry::get<1>(p); /*glBegin(GL_POINT); glVertex3f(x, y, z); glEnd();*/ @@ -62,7 +62,7 @@ struct gl_draw_box template struct gl_draw_box { - static inline void apply(Box const& b, typename coordinate_type::type z) + static inline void apply(Box const& b, coordinate_type_t z) { glBegin(GL_LINE_LOOP); glVertex3f(geometry::get(b), geometry::get(b), z); @@ -80,7 +80,7 @@ struct gl_draw_segment template struct gl_draw_segment { - static inline void apply(Segment const& s, typename coordinate_type::type z) + static inline void apply(Segment const& s, coordinate_type_t z) { glBegin(GL_LINES); glVertex3f(geometry::get<0, 0>(s), geometry::get<0, 1>(s), z); @@ -115,7 +115,7 @@ struct gl_draw_indexable } // namespace dispatch template inline -void gl_draw_indexable(Indexable const& i, typename coordinate_type::type z) +void gl_draw_indexable(Indexable const& i, coordinate_type_t z) { dispatch::gl_draw_indexable< Indexable, @@ -142,7 +142,7 @@ struct gl_draw inline gl_draw(translator_type const& t, size_t level_first = 0, size_t level_last = (std::numeric_limits::max)(), - typename coordinate_type::type z_coord_level_multiplier = 1 + coordinate_type_t z_coord_level_multiplier = 1 ) : tr(t) , level_f(level_first) @@ -219,7 +219,7 @@ struct gl_draw translator_type const& tr; size_t level_f; size_t level_l; - typename coordinate_type::type z_mul; + coordinate_type_t z_mul; size_t level; }; @@ -230,9 +230,7 @@ template inline void gl_draw(Rtree const& tree, size_t level_first = 0, size_t level_last = (std::numeric_limits::max)(), - typename coordinate_type< - typename Rtree::bounds_type - >::type z_coord_level_multiplier = 1 + coordinate_type_t z_coord_level_multiplier = 1 ) { typedef utilities::view RTV; diff --git a/include/boost/geometry/index/detail/serialization.hpp b/include/boost/geometry/index/detail/serialization.hpp index acb8cde2a..4ffd6a6c4 100644 --- a/include/boost/geometry/index/detail/serialization.hpp +++ b/include/boost/geometry/index/detail/serialization.hpp @@ -252,7 +252,7 @@ struct serialize_point template static inline void save(Archive & ar, P const& p, unsigned int version) { - typename coordinate_type

::type c = get(p); + coordinate_type_t

c = get(p); ar << boost::serialization::make_nvp("c", c); serialize_point::save(ar, p, version); } @@ -260,7 +260,7 @@ struct serialize_point template static inline void load(Archive & ar, P & p, unsigned int version) { - typename geometry::coordinate_type

::type c; + geometry::coordinate_type_t

c; ar >> boost::serialization::make_nvp("c", c); set(p, c); serialize_point::load(ar, p, version); diff --git a/include/boost/geometry/index/rtree.hpp b/include/boost/geometry/index/rtree.hpp index 584a77624..61cecb2cd 100644 --- a/include/boost/geometry/index/rtree.hpp +++ b/include/boost/geometry/index/rtree.hpp @@ -193,7 +193,7 @@ public: /*! \brief The Box type used by the R-tree. */ typedef geometry::model::box< geometry::model::point< - typename coordinate_type::type, + coordinate_type_t, dimension::value, typename coordinate_system::type > diff --git a/include/boost/geometry/io/svg/svg_mapper.hpp b/include/boost/geometry/io/svg/svg_mapper.hpp index a81e874e5..01a32d54c 100644 --- a/include/boost/geometry/io/svg/svg_mapper.hpp +++ b/include/boost/geometry/io/svg/svg_mapper.hpp @@ -270,7 +270,7 @@ class svg_mapper : boost::noncopyable typedef typename geometry::select_most_precise < - typename coordinate_type::type, + coordinate_type_t, double >::type calculation_type; diff --git a/include/boost/geometry/io/svg/write.hpp b/include/boost/geometry/io/svg/write.hpp index a8be963fd..e56ae13bc 100644 --- a/include/boost/geometry/io/svg/write.hpp +++ b/include/boost/geometry/io/svg/write.hpp @@ -71,7 +71,7 @@ struct svg_box // Prevent invisible boxes, making them >=1, using "max" BOOST_USING_STD_MAX(); - typedef typename coordinate_type::type ct; + using ct = coordinate_type_t; ct x = geometry::get(box); ct y = geometry::get(box); ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1), @@ -92,11 +92,11 @@ struct svg_segment static inline void apply(std::basic_ostream& os, Segment const& segment, std::string const& style, double) { - typedef typename coordinate_type::type ct; - ct x1 = geometry::get<0, 0>(segment); - ct y1 = geometry::get<0, 1>(segment); - ct x2 = geometry::get<1, 0>(segment); - ct y2 = geometry::get<1, 1>(segment); + using ct = coordinate_type_t; + ct const x1 = geometry::get<0, 0>(segment); + ct const y1 = geometry::get<0, 1>(segment); + ct const x2 = geometry::get<1, 0>(segment); + ct const y2 = geometry::get<1, 1>(segment); os << "::type; + using coordinate_type = coordinate_type_t; // Stop at end of tokens, or at "," ot ")" bool finished = (it == end || *it == "," || *it == ")"); @@ -263,7 +263,7 @@ template ::type const& point, bool) + inline void append(Geometry geom, geometry::point_type_t const& point, bool) { geometry::append(geom, point); } @@ -272,7 +272,7 @@ struct stateful_range_appender template struct stateful_range_appender { - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; using size_type = typename boost::range_size < typename util::remove_cptrref::type @@ -329,7 +329,7 @@ private: template struct container_appender { - using point_type = typename geometry::point_type::type; + using point_type = geometry::point_type_t; template static inline void apply(TokenizerIterator& it, diff --git a/include/boost/geometry/iterators/detail/point_iterator/value_type.hpp b/include/boost/geometry/iterators/detail/point_iterator/value_type.hpp index c5321b118..d98cb0326 100644 --- a/include/boost/geometry/iterators/detail/point_iterator/value_type.hpp +++ b/include/boost/geometry/iterators/detail/point_iterator/value_type.hpp @@ -32,8 +32,8 @@ struct value_type typedef std::conditional_t < ! std::is_const::value, - typename geometry::point_type::type, - typename geometry::point_type::type const + geometry::point_type_t, + geometry::point_type_t const > type; }; diff --git a/include/boost/geometry/policies/robustness/segment_ratio.hpp b/include/boost/geometry/policies/robustness/segment_ratio.hpp index 47851a62c..746cf217d 100644 --- a/include/boost/geometry/policies/robustness/segment_ratio.hpp +++ b/include/boost/geometry/policies/robustness/segment_ratio.hpp @@ -351,7 +351,7 @@ private : template struct segment_ratio_type { - using type = segment_ratio::type>; + using type = segment_ratio>; }; }} // namespace boost::geometry diff --git a/include/boost/geometry/srs/projections/impl/pj_transform.hpp b/include/boost/geometry/srs/projections/impl/pj_transform.hpp index 9f16c0e6f..3f4a8b07c 100644 --- a/include/boost/geometry/srs/projections/impl/pj_transform.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_transform.hpp @@ -75,7 +75,7 @@ template > struct z_access { - typedef typename coordinate_type::type type; + using type = coordinate_type_t; static inline type get(Point const& point) { return geometry::get<2>(point); @@ -89,7 +89,7 @@ struct z_access template struct z_access { - typedef typename coordinate_type::type type; + using type = coordinate_type_t; static inline type get(Point const& ) { return type(0); @@ -119,9 +119,9 @@ template > struct range_wrapper { - typedef Range range_type; - typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using range_type = Range; + using point_type = typename boost::range_value::type; + using coord_t = coordinate_type_t; range_wrapper(Range & range) : m_range(range) @@ -139,9 +139,9 @@ private: template struct range_wrapper { - typedef Range range_type; - typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using range_type = Range; + using point_type = typename boost::range_value::type; + using coord_t = coordinate_type_t; range_wrapper(Range & range) : m_range(range) @@ -237,8 +237,8 @@ inline bool pj_transform(SrcPrj const& srcprj, Par const& srcdefn, Grids const& dstgrids) { - typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using point_type = typename boost::range_value::type; + using coord_t = coordinate_type_t; static const std::size_t dimension = geometry::dimension::value; std::size_t point_count = boost::size(range); bool result = true; @@ -616,9 +616,7 @@ inline int pj_geodetic_to_geocentric( T const& a, T const& es, range_wrapper & range_wrapper ) { - //typedef typename boost::range_iterator::type iterator; - typedef typename boost::range_value::type point_type; - //typedef typename coordinate_type::type coord_t; + using point_type = typename boost::range_value::type; Range & rng = range_wrapper.get_range(); std::size_t point_count = boost::size(rng); @@ -671,9 +669,7 @@ inline int pj_geocentric_to_geodetic( T const& a, T const& es, range_wrapper & range_wrapper ) { - //typedef typename boost::range_iterator::type iterator; - typedef typename boost::range_value::type point_type; - //typedef typename coordinate_type::type coord_t; + using point_type = typename boost::range_value::type; Range & rng = range_wrapper.get_range(); std::size_t point_count = boost::size(rng); @@ -762,20 +758,22 @@ inline int pj_geocentric_to_wgs84( Par const& defn, range_wrapper & range_wrapper ) { - typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using point_type = typename boost::range_value::type; + using coord_t = coordinate_type_t; - Range & rng = range_wrapper.get_range(); + Range& rng = range_wrapper.get_range(); std::size_t point_count = boost::size(rng); - if( defn.datum_type == datum_3param ) + if (defn.datum_type == datum_3param) { - for(std::size_t i = 0; i < point_count; i++ ) + for (std::size_t i = 0; i < point_count; i++ ) { - point_type & point = range::at(rng, i); + point_type& point = range::at(rng, i); - if( is_invalid_point(point) ) + if (is_invalid_point(point)) + { continue; + } set<0>(point, get<0>(point) + Dx_BF(defn)); set<1>(point, get<1>(point) + Dy_BF(defn)); @@ -819,20 +817,22 @@ inline int pj_geocentric_from_wgs84( Par const& defn, range_wrapper & range_wrapper ) { - typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using point_type = typename boost::range_value::type; + using coord_t = coordinate_type_t; - Range & rng = range_wrapper.get_range(); + Range& rng = range_wrapper.get_range(); std::size_t point_count = boost::size(rng); - if( defn.datum_type == datum_3param ) + if (defn.datum_type == datum_3param) { - for(std::size_t i = 0; i < point_count; i++ ) + for (std::size_t i = 0; i < point_count; i++ ) { - point_type & point = range::at(rng, i); + point_type& point = range::at(rng, i); - if( is_invalid_point(point) ) + if (is_invalid_point(point)) + { continue; + } set<0>(point, get<0>(point) - Dx_BF(defn)); set<1>(point, get<1>(point) - Dy_BF(defn)); diff --git a/include/boost/geometry/srs/transformation.hpp b/include/boost/geometry/srs/transformation.hpp index b327e1121..cab555da4 100644 --- a/include/boost/geometry/srs/transformation.hpp +++ b/include/boost/geometry/srs/transformation.hpp @@ -93,18 +93,18 @@ struct transform_geometry_point_coordinates template struct transform_geometry_point { - typedef typename geometry::point_type::type point_type; + using point_type = geometry::point_type_t; - typedef geometry::model::point + using type = geometry::model::point < typename select_most_precise < - typename geometry::coordinate_type::type, + geometry::coordinate_type_t, CT >::type, geometry::dimension::type::value, typename geometry::coordinate_system::type - > type; + >; template static inline void apply(PtIn const& in, PtOut & out, bool enable_angles) @@ -229,10 +229,10 @@ template < typename select_most_precise < - typename geometry::coordinate_type::type, + geometry::coordinate_type_t, CT >::type, - typename geometry::coordinate_type::type + geometry::coordinate_type_t >::value > struct transform_geometry_wrapper diff --git a/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp b/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp index fd52eb259..49f876105 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp @@ -118,13 +118,12 @@ public : RangeOut& range_out) const { boost::ignore_unused(perp_left_point); - typedef typename coordinate_type::type coordinate_type; - typedef typename geometry::select_most_precise + using promoted_type = typename geometry::select_most_precise < - coordinate_type, + coordinate_type_t, double - >::type promoted_type; + >::type; promoted_type const dist_left = distance.apply(penultimate_point, ultimate_point, buffer_side_left); promoted_type const dist_right = distance.apply(penultimate_point, ultimate_point, buffer_side_right); diff --git a/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp b/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp index a47b3fa01..233b4473d 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp @@ -77,12 +77,11 @@ public: return false; } - typedef typename coordinate_type::type coordinate_type; - typedef typename geometry::select_most_precise + using promoted_type = typename geometry::select_most_precise < - coordinate_type, + coordinate_type_t, double - >::type promoted_type; + >::type; Point p = ip; diff --git a/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp b/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp index 95553685c..e5e9c31e1 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp @@ -128,18 +128,12 @@ public : DistanceType const& buffer_distance, RangeOut& range_out) const { - typedef typename coordinate_type::type coordinate_type; - typedef typename boost::range_value::type output_point_type; - - typedef typename geometry::select_most_precise + using promoted_type = typename geometry::select_most_precise < - typename geometry::select_most_precise - < - coordinate_type, - typename geometry::coordinate_type::type - >::type, + coordinate_type_t, + geometry::coordinate_type_t::type>, double - >::type promoted_type; + >::type; geometry::equal_to equals; if (equals(perp1, perp2)) diff --git a/include/boost/geometry/strategies/cartesian/buffer_join_round_by_divide.hpp b/include/boost/geometry/strategies/cartesian/buffer_join_round_by_divide.hpp index 0a2c7ebf6..3230b4113 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_join_round_by_divide.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_join_round_by_divide.hpp @@ -85,13 +85,11 @@ public : DistanceType const& buffer_distance, RangeOut& range_out) const { - typedef typename coordinate_type::type coordinate_type; - - typedef typename geometry::select_most_precise + using promoted_type = typename geometry::select_most_precise < - coordinate_type, + coordinate_type_t, double - >::type promoted_type; + >::type; geometry::equal_to equals; diff --git a/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp b/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp index b6fc0707b..bce0fe8a8 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_point_circle.hpp @@ -74,17 +74,14 @@ public : DistanceStrategy const& distance_strategy, OutputRange& output_range) const { - typedef typename boost::range_value::type output_point_type; + using output_point_type = typename boost::range_value::type; - typedef typename geometry::select_most_precise + using promoted_type = typename geometry::select_most_precise < - typename geometry::select_most_precise - < - typename geometry::coordinate_type::type, - typename geometry::coordinate_type::type - >::type, + geometry::coordinate_type_t, + geometry::coordinate_type_t, double - >::type promoted_type; + >::type; promoted_type const buffer_distance = distance_strategy.apply(point, point, strategy::buffer::buffer_side_left); diff --git a/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp b/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp index 10dac4298..91c69e0bd 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp @@ -66,12 +66,12 @@ public : DistanceStrategy const& distance, OutputRange& output_range) { - typedef typename coordinate_type::type coordinate_type; - typedef typename geometry::select_most_precise + using coordinate_type = coordinate_type_t; + using promoted_type = typename geometry::select_most_precise < coordinate_type, double - >::type promoted_type; + >::type; // Generate a block along (left or right of) the segment diff --git a/include/boost/geometry/strategies/cartesian/centroid_average.hpp b/include/boost/geometry/strategies/cartesian/centroid_average.hpp index 5b642a7f4..34654118c 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_average.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_average.hpp @@ -89,7 +89,7 @@ public : centroid = state.centroid; if ( state.count > 0 ) { - using coord_t = typename coordinate_type::type; + using coord_t = coordinate_type_t; divide_value(centroid, static_cast(state.count)); return true; } diff --git a/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp b/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp index 8e4c014a4..7104ed666 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp @@ -134,8 +134,8 @@ private : std::is_void::value, typename select_most_precise < - typename coordinate_type::type, - typename coordinate_type::type, + coordinate_type_t, + coordinate_type_t, double >::type, CalculationType @@ -211,10 +211,7 @@ public : calc_type const v3 = 3; calc_type const a3 = v3 * state.sum_a2; - typedef typename geometry::coordinate_type - < - ResultPoint - >::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; // Prevent NaN centroid coordinates if (boost::math::isfinite(a3)) diff --git a/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp b/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp index 6e8595881..534f1be32 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp @@ -129,7 +129,7 @@ public : // if e.g. distance_type is double and centroid contains floats geometry::detail::for_each_dimension([&](auto dimension) { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; geometry::set( centroid, util::numeric_cast( diff --git a/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp b/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp index 557cd48dd..3b79de2a7 100644 --- a/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp +++ b/include/boost/geometry/strategies/cartesian/closest_points_pt_seg.hpp @@ -117,8 +117,8 @@ public: < typename select_most_precise < - typename coordinate_type::type, - typename coordinate_type::type, + coordinate_type_t, + coordinate_type_t, CalculationType >::type > diff --git a/include/boost/geometry/strategies/cartesian/densify.hpp b/include/boost/geometry/strategies/cartesian/densify.hpp index 4d18e1f0c..db0263373 100644 --- a/include/boost/geometry/strategies/cartesian/densify.hpp +++ b/include/boost/geometry/strategies/cartesian/densify.hpp @@ -53,15 +53,15 @@ public: template static inline void apply(Point const& p0, Point const& p1, AssignPolicy & policy, T const& length_threshold) { - typedef typename AssignPolicy::point_type out_point_t; - typedef typename coordinate_type::type out_coord_t; - typedef typename select_most_precise + using out_point_t = typename AssignPolicy::point_type; + using out_coord_t = coordinate_type_t; + using calc_t = typename select_most_precise < - typename coordinate_type::type, out_coord_t, + coordinate_type_t, out_coord_t, CalculationType - >::type calc_t; + >::type; - typedef model::point::value, cs::cartesian> calc_point_t; + using calc_point_t = model::point::value, cs::cartesian>; assert_dimension_equal(); diff --git a/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp b/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp index 39ebe395c..645edb213 100644 --- a/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp +++ b/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp @@ -54,11 +54,8 @@ struct compute_tmin_tmax_per_dim RelativeDistance& ti_max, RelativeDistance& diff) { - typedef typename coordinate_type::type box_coordinate_type; - typedef typename coordinate_type - < - SegmentPoint - >::type point_coordinate_type; + using box_coordinate_type = coordinate_type_t; + using point_coordinate_type = coordinate_type_t; RelativeDistance c_p0 = util::numeric_cast < diff --git a/include/boost/geometry/strategies/cartesian/intersection.hpp b/include/boost/geometry/strategies/cartesian/intersection.hpp index d6fc5c9bb..3b82a95a6 100644 --- a/include/boost/geometry/strategies/cartesian/intersection.hpp +++ b/include/boost/geometry/strategies/cartesian/intersection.hpp @@ -295,13 +295,13 @@ struct cartesian_segments point2_type const& q1 = range_q.at(0); point2_type const& q2 = range_q.at(1); - typedef typename select_most_precise + using coordinate_type = typename select_most_precise < - typename geometry::coordinate_type::type, - typename geometry::coordinate_type::type - >::type coordinate_type; + geometry::coordinate_type_t, + geometry::coordinate_type_t + >::type; - typedef segment_ratio ratio_type; + using ratio_type = segment_ratio; segment_intersection_info < typename select_calculation_type::type, @@ -361,8 +361,8 @@ struct cartesian_segments UniqueSubRange2 const& range_q, Policy const&) { - typedef typename UniqueSubRange1::point_type point1_type; - typedef typename UniqueSubRange2::point_type point2_type; + using point1_type = typename UniqueSubRange1::point_type; + using point2_type = typename UniqueSubRange2::point_type; point1_type const& p1 = range_p.at(0); point1_type const& p2 = range_p.at(1); @@ -419,11 +419,11 @@ struct cartesian_segments // (only calculated for non-collinear segments) if (! collinear) { - typedef typename select_most_precise + using coordinate_type = typename select_most_precise < - typename geometry::coordinate_type::type, - typename geometry::coordinate_type::type - >::type coordinate_type; + geometry::coordinate_type_t, + geometry::coordinate_type_t + >::type; coordinate_type denominator_a; coordinate_type nominator_a; diff --git a/include/boost/geometry/strategies/cartesian/line_interpolate.hpp b/include/boost/geometry/strategies/cartesian/line_interpolate.hpp index a63cb8548..356c19734 100644 --- a/include/boost/geometry/strategies/cartesian/line_interpolate.hpp +++ b/include/boost/geometry/strategies/cartesian/line_interpolate.hpp @@ -55,11 +55,11 @@ public: Point & p, Distance const&) const { - typedef typename select_calculation_type_alt + using calc_t = typename select_calculation_type_alt < CalculationType, Point - >::type calc_t; - typedef typename coordinate_type::type coord_t; + >::type; + using coord_t = coordinate_type_t; //segment convex combination: p0*fraction + p1*(1-fraction) Fraction const one_minus_fraction = 1-fraction; diff --git a/include/boost/geometry/strategies/compare.hpp b/include/boost/geometry/strategies/compare.hpp index ecfafc434..739b4a2bd 100644 --- a/include/boost/geometry/strategies/compare.hpp +++ b/include/boost/geometry/strategies/compare.hpp @@ -106,10 +106,8 @@ struct compare_loop template static inline bool apply(Point1 const& left, Point2 const& right) { - typename geometry::coordinate_type::type const& - cleft = geometry::get(left); - typename geometry::coordinate_type::type const& - cright = geometry::get(right); + auto const& cleft = geometry::get(left); + auto const& cright = geometry::get(right); if (EqualsPolicy::apply(cleft, cright)) { diff --git a/include/boost/geometry/strategies/concepts/area_concept.hpp b/include/boost/geometry/strategies/concepts/area_concept.hpp index da983bac5..f31bfa93c 100644 --- a/include/boost/geometry/strategies/concepts/area_concept.hpp +++ b/include/boost/geometry/strategies/concepts/area_concept.hpp @@ -53,7 +53,7 @@ class AreaStrategy state_type *st = 0; // 3) must implement a method apply with the following signature - typename geometry::point_type::type const* sp = 0; + geometry::point_type_t const* sp = 0; str->apply(*sp, *sp, *st); // 4) must implement a static method result with the following signature diff --git a/include/boost/geometry/strategies/concepts/within_concept.hpp b/include/boost/geometry/strategies/concepts/within_concept.hpp index d296fc513..7e37f45af 100644 --- a/include/boost/geometry/strategies/concepts/within_concept.hpp +++ b/include/boost/geometry/strategies/concepts/within_concept.hpp @@ -93,16 +93,16 @@ class WithinStrategyPolygonal { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename geometry::point_type::type point_of_segment; + using point_of_segment = geometry::point_type_t; // 0) - typedef typename concepts::detail::relate_strategy_dispatch + using strategy_type = typename concepts::detail::relate_strategy_dispatch < Point, Polygonal, Strategy - >::type strategy_type; + >::type; // 1) must define state_type - typedef typename strategy_type::state_type state_type; + using state_type = typename strategy_type::state_type; struct checker { diff --git a/include/boost/geometry/strategies/default_length_result.hpp b/include/boost/geometry/strategies/default_length_result.hpp index 7739cb834..2cbe796f7 100644 --- a/include/boost/geometry/strategies/default_length_result.hpp +++ b/include/boost/geometry/strategies/default_length_result.hpp @@ -53,7 +53,7 @@ struct default_length_result_impl> { using type = typename select_most_precise < - typename coordinate_type::type..., + coordinate_type_t..., long double >::type; }; diff --git a/include/boost/geometry/strategies/geographic/densify.hpp b/include/boost/geometry/strategies/geographic/densify.hpp index 529f90d6b..e6e0abf28 100644 --- a/include/boost/geometry/strategies/geographic/densify.hpp +++ b/include/boost/geometry/strategies/geographic/densify.hpp @@ -63,16 +63,16 @@ public: template inline void apply(Point const& p0, Point const& p1, AssignPolicy & policy, T const& length_threshold) const { - typedef typename AssignPolicy::point_type out_point_t; - typedef typename select_most_precise + using out_point_t = typename AssignPolicy::point_type; + using calc_t = typename select_most_precise < - typename coordinate_type::type, - typename coordinate_type::type, + coordinate_type_t, + coordinate_type_t, CalculationType - >::type calc_t; + >::type; - typedef typename FormulaPolicy::template direct direct_t; - typedef typename FormulaPolicy::template inverse inverse_t; + using direct_t = typename FormulaPolicy::template direct; + using inverse_t = typename FormulaPolicy::template inverse; typename inverse_t::result_type inv_r = inverse_t::apply(get_as_radian<0>(p0), get_as_radian<1>(p0), diff --git a/include/boost/geometry/strategies/geographic/intersection.hpp b/include/boost/geometry/strategies/geographic/intersection.hpp index 3f10ce092..97b2ad592 100644 --- a/include/boost/geometry/strategies/geographic/intersection.hpp +++ b/include/boost/geometry/strategies/geographic/intersection.hpp @@ -148,10 +148,10 @@ struct geographic_segments BOOST_CONCEPT_ASSERT( (concepts::ConstPoint) ); /* - typename coordinate_type::type + coordinate_type_t const a1_lon = get<0>(a1), const a2_lon = get<0>(a2); - typename coordinate_type::type + coordinate_type_t const b1_lon = get<0>(b1), const b2_lon = get<0>(b2); bool is_a_reversed = a1_lon > a2_lon || a1_lon == a2_lon && get<1>(a1) > get<1>(a2); diff --git a/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp b/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp index c7aaf8aa8..d3babe8a7 100644 --- a/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp +++ b/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp @@ -49,7 +49,7 @@ struct great_elliptic_segments_calc_policy template struct plane { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; // not normalized plane(Point3d const& p1, Point3d const& p2) @@ -98,7 +98,7 @@ struct great_elliptic_segments_calc_policy plane const& plane2, Point3d & ip1, Point3d & ip2) const { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; Point3d id = cross_product(plane1.normal, plane2.normal); // NOTE: the length should be greater than 0 at this point @@ -140,7 +140,7 @@ struct experimental_elliptic_segments_calc_policy template struct plane { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; // not normalized plane(Point3d const& p1, Point3d const& p2, Spheroid const& spheroid) diff --git a/include/boost/geometry/strategies/intersection_result.hpp b/include/boost/geometry/strategies/intersection_result.hpp index 971dc9f2b..7feea9f2d 100644 --- a/include/boost/geometry/strategies/intersection_result.hpp +++ b/include/boost/geometry/strategies/intersection_result.hpp @@ -58,7 +58,7 @@ struct fraction_type template < typename Point, - typename SegmentRatio = segment_ratio::type> + typename SegmentRatio = segment_ratio> > struct segment_intersection_points { diff --git a/include/boost/geometry/strategies/normalize.hpp b/include/boost/geometry/strategies/normalize.hpp index 8cfaf9522..e9887d5ed 100644 --- a/include/boost/geometry/strategies/normalize.hpp +++ b/include/boost/geometry/strategies/normalize.hpp @@ -58,7 +58,7 @@ struct assign_loop { geometry::set(point_out, util::numeric_cast < - typename coordinate_type::type + coordinate_type_t >(geometry::get(point_in))); assign_loop @@ -89,10 +89,7 @@ struct assign_loop<0, DimensionCount> PointIn const& point_in, PointOut& point_out) { - geometry::set<0>(point_out, util::numeric_cast - < - typename coordinate_type::type - >(longitude)); + geometry::set<0>(point_out, util::numeric_cast>(longitude)); assign_loop < @@ -112,7 +109,7 @@ struct assign_loop<1, DimensionCount> { geometry::set<1>(point_out, util::numeric_cast < - typename coordinate_type::type + coordinate_type_t >(latitude)); assign_loop @@ -128,7 +125,7 @@ struct normalize_point { static inline void apply(PointIn const& point_in, PointOut& point_out) { - typedef typename coordinate_type::type in_coordinate_type; + using in_coordinate_type = coordinate_type_t; in_coordinate_type longitude = geometry::get<0>(point_in); in_coordinate_type latitude = geometry::get<1>(point_in); @@ -187,7 +184,7 @@ class normalize_box public: static inline void apply(BoxIn const& box_in, BoxOut& box_out) { - typedef typename coordinate_type::type in_coordinate_type; + using in_coordinate_type = coordinate_type_t; in_coordinate_type lon_min = geometry::get(box_in); in_coordinate_type lat_min = geometry::get(box_in); diff --git a/include/boost/geometry/strategies/spherical/compare.hpp b/include/boost/geometry/strategies/spherical/compare.hpp index dc3d14bef..a8e829fe2 100644 --- a/include/boost/geometry/strategies/spherical/compare.hpp +++ b/include/boost/geometry/strategies/spherical/compare.hpp @@ -45,14 +45,14 @@ namespace detail { template -static inline typename geometry::coordinate_type

::type +static inline geometry::coordinate_type_t

get(P const& p, std::true_type /*same units*/) { return geometry::get(p); } template -static inline typename geometry::coordinate_type

::type +static inline geometry::coordinate_type_t

get(P const& p, std::false_type /*different units*/) { return geometry::get_as_radian(p); @@ -68,11 +68,11 @@ template > struct spherical_latitude { - typedef typename geometry::coordinate_type::type coordinate1_type; - typedef typename geometry::detail::cs_angular_units::type units1_type; - typedef typename geometry::coordinate_type::type coordinate2_type; - typedef typename geometry::detail::cs_angular_units::type units2_type; - typedef std::is_same same_units_type; + using coordinate1_type = geometry::coordinate_type_t; + using units1_type = typename geometry::detail::cs_angular_units::type; + using coordinate2_type = geometry::coordinate_type_t; + using units2_type = typename geometry::detail::cs_angular_units::type; + using same_units_type = std::is_same; template static inline bool apply(Point1 const& left, Point2 const& right, @@ -136,12 +136,12 @@ template > struct spherical_longitude { - typedef typename geometry::coordinate_type::type coordinate1_type; - typedef typename geometry::detail::cs_angular_units::type units1_type; - typedef typename geometry::coordinate_type::type coordinate2_type; - typedef typename geometry::detail::cs_angular_units::type units2_type; - typedef std::is_same same_units_type; - typedef std::conditional_t units_type; + using coordinate1_type = geometry::coordinate_type_t; + using units1_type = typename geometry::detail::cs_angular_units::type; + using coordinate2_type = geometry::coordinate_type_t; + using units2_type = typename geometry::detail::cs_angular_units::type; + using same_units_type = std::is_same; + using units_type = std::conditional_t; static const bool is_equatorial = ! std::is_same < diff --git a/include/boost/geometry/strategies/spherical/densify.hpp b/include/boost/geometry/strategies/spherical/densify.hpp index 8b14f7ae6..0113b772b 100644 --- a/include/boost/geometry/strategies/spherical/densify.hpp +++ b/include/boost/geometry/strategies/spherical/densify.hpp @@ -79,13 +79,13 @@ public: template inline void apply(Point const& p0, Point const& p1, AssignPolicy & policy, T const& length_threshold) const { - typedef typename AssignPolicy::point_type out_point_t; - typedef typename select_most_precise + using out_point_t = typename AssignPolicy::point_type; + using calc_t = typename select_most_precise < - typename coordinate_type::type, - typename coordinate_type::type, + coordinate_type_t, + coordinate_type_t, CalculationType - >::type calc_t; + >::type; calc_t angle01; diff --git a/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp b/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp index f0504a8b1..5e00e1b99 100644 --- a/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp +++ b/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp @@ -46,8 +46,8 @@ struct box_box_on_spheroid { typedef typename geometry::select_most_precise < - typename coordinate_type::type, - typename coordinate_type::type + coordinate_type_t, + coordinate_type_t >::type calc_t; typedef typename geometry::detail::cs_angular_units::type units_t; typedef math::detail::constants_on_spheroid constants; diff --git a/include/boost/geometry/strategies/spherical/distance_segment_box.hpp b/include/boost/geometry/strategies/spherical/distance_segment_box.hpp index 32ce3bcaa..cbbdc2a52 100644 --- a/include/boost/geometry/strategies/spherical/distance_segment_box.hpp +++ b/include/boost/geometry/strategies/spherical/distance_segment_box.hpp @@ -107,15 +107,15 @@ struct generic_segment_box // disjoint but vertex not computed if (disjoint_result == disjoint_info_type::disjoint_no_vertex) { - typedef typename coordinate_type::type CT; + using coor_t = coordinate_type_t; geometry::model::box mbr; geometry::envelope(seg, mbr, strategies); - CT lon1 = geometry::get_as_radian<0>(p0); - CT lat1 = geometry::get_as_radian<1>(p0); - CT lon2 = geometry::get_as_radian<0>(p1); - CT lat2 = geometry::get_as_radian<1>(p1); + coor_t lon1 = geometry::get_as_radian<0>(p0); + coor_t lat1 = geometry::get_as_radian<1>(p0); + coor_t lon2 = geometry::get_as_radian<0>(p1); + coor_t lat2 = geometry::get_as_radian<1>(p1); if (lon1 > lon2) { @@ -123,22 +123,22 @@ struct generic_segment_box std::swap(lat1, lat2); } - CT vertex_lat; - CT lat_sum = lat1 + lat2; - if (lat_sum > CT(0)) + coor_t vertex_lat; + coor_t lat_sum = lat1 + lat2; + if (lat_sum > coor_t(0)) { vertex_lat = geometry::get_as_radian(mbr); } else { vertex_lat = geometry::get_as_radian(mbr); } - CT alp1; + coor_t alp1; strategies.azimuth().apply(lon1, lat1, lon2, lat2, alp1); // TODO: formula should not call strategy! - CT vertex_lon = geometry::formula::vertex_longitude + coor_t vertex_lon = geometry::formula::vertex_longitude < - CT, + coor_t, cs_tag >::apply(lon1, lat1, lon2, lat2, vertex_lat, alp1, strategies.azimuth()); diff --git a/include/boost/geometry/strategies/spherical/get_radius.hpp b/include/boost/geometry/strategies/spherical/get_radius.hpp index 411642b13..01a924319 100644 --- a/include/boost/geometry/strategies/spherical/get_radius.hpp +++ b/include/boost/geometry/strategies/spherical/get_radius.hpp @@ -57,11 +57,11 @@ struct get_radius template struct get_radius { - typedef typename select_most_precise + using type = typename select_most_precise < - typename coordinate_type::type, + coordinate_type_t, double - >::type type; + >::type; template static typename get_radius::type diff --git a/include/boost/geometry/strategies/spherical/intersection.hpp b/include/boost/geometry/strategies/spherical/intersection.hpp index 804efd766..0cc547786 100644 --- a/include/boost/geometry/strategies/spherical/intersection.hpp +++ b/include/boost/geometry/strategies/spherical/intersection.hpp @@ -794,7 +794,7 @@ struct spherical_segments_calc_policy template struct plane { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; // not normalized plane(Point3d const& p1, Point3d const& p2) @@ -832,7 +832,7 @@ struct spherical_segments_calc_policy plane const& plane2, Point3d & ip1, Point3d & ip2) { - typedef typename coordinate_type::type coord_t; + using coord_t = coordinate_type_t; ip1 = cross_product(plane1.normal, plane2.normal); // NOTE: the length should be greater than 0 at this point diff --git a/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp b/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp index a11c3c705..d60ea19b4 100644 --- a/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp +++ b/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp @@ -465,8 +465,8 @@ protected: PointOfSegment const& se, count_info const& ci) const { - typedef typename coordinate_type::type scoord_t; - typedef typename geometry::detail::cs_angular_units::type units_t; + using scoord_t = coordinate_type_t; + using units_t = typename geometry::detail::cs_angular_units::type; if (math::equals(get<1>(point), get<1>(se))) { diff --git a/include/boost/geometry/strategies/transform/matrix_transformers.hpp b/include/boost/geometry/strategies/transform/matrix_transformers.hpp index 937cc1489..1d782727f 100644 --- a/include/boost/geometry/strategies/transform/matrix_transformers.hpp +++ b/include/boost/geometry/strategies/transform/matrix_transformers.hpp @@ -61,7 +61,7 @@ struct set_point_from_vec template static inline void apply(Point & p, Vector const& v) { - typedef typename geometry::coordinate_type::type coord_t; + using coord_t = geometry::coordinate_type_t; set(p, util::numeric_cast(qvm::A(v))); set_point_from_vec::apply(p, v); } @@ -197,7 +197,7 @@ public : ct const& c1 = get<0>(p1); ct const& c2 = get<1>(p1); - typedef typename geometry::coordinate_type::type ct2; + using ct2 = geometry::coordinate_type_t; set<0>(p2, util::numeric_cast(c1 * qvm::A<0,0>(this->m_matrix) + c2 * qvm::A<0,1>(this->m_matrix) + qvm::A<0,2>(this->m_matrix))); set<1>(p2, util::numeric_cast(c1 * qvm::A<1,0>(this->m_matrix) + c2 * qvm::A<1,1>(this->m_matrix) + qvm::A<1,2>(this->m_matrix))); @@ -240,7 +240,7 @@ public : ct const& c2 = get<1>(p1); ct const& c3 = get<2>(p1); - typedef typename geometry::coordinate_type::type ct2; + using ct2 = geometry::coordinate_type_t; set<0>(p2, util::numeric_cast( c1 * qvm::A<0,0>(this->m_matrix) + c2 * qvm::A<0,1>(this->m_matrix) + c3 * qvm::A<0,2>(this->m_matrix) + qvm::A<0,3>(this->m_matrix))); @@ -289,7 +289,7 @@ public : ct const& c2 = get<1>(p1); ct const& c3 = get<2>(p1); - typedef typename geometry::coordinate_type::type ct2; + using ct2 = geometry::coordinate_type_t; set<0>(p2, util::numeric_cast( c1 * qvm::A<0,0>(this->m_matrix) + c2 * qvm::A<0,1>(this->m_matrix) + c3 * qvm::A<0,2>(this->m_matrix) + qvm::A<0,3>(this->m_matrix))); diff --git a/include/boost/geometry/strategy/area.hpp b/include/boost/geometry/strategy/area.hpp index 24c7fbc58..2bf1beab0 100644 --- a/include/boost/geometry/strategy/area.hpp +++ b/include/boost/geometry/strategy/area.hpp @@ -58,7 +58,7 @@ template struct result_type : select_most_precise < - typename coordinate_type::type, + coordinate_type_t, double > {}; diff --git a/include/boost/geometry/strategy/cartesian/side_by_triangle.hpp b/include/boost/geometry/strategy/cartesian/side_by_triangle.hpp index 9535912e6..3fdbd8019 100644 --- a/include/boost/geometry/strategy/cartesian/side_by_triangle.hpp +++ b/include/boost/geometry/strategy/cartesian/side_by_triangle.hpp @@ -211,9 +211,9 @@ public : using promoted_t = typename select_most_precise::type; bool const are_all_integral_coordinates = - std::is_integral::type>::value - && std::is_integral::type>::value - && std::is_integral::type>::value; + std::is_integral>::value + && std::is_integral>::value + && std::is_integral>::value; eps_policy< math::detail::equals_factor_policy > epsp; promoted_t s = compute_side_value diff --git a/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp b/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp index 049360892..afeda0aa4 100644 --- a/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp @@ -212,11 +212,11 @@ public: { using point_type = point_type_t; using coordinate_type = coordinate_type_t; - typedef math::detail::constants_on_spheroid + using constants = math::detail::constants_on_spheroid < coordinate_type, typename geometry::detail::cs_angular_units::type - > constants; + >; if (boost::empty(multipoint)) { diff --git a/include/boost/geometry/strategy/spherical/envelope_range.hpp b/include/boost/geometry/strategy/spherical/envelope_range.hpp index e9f5ba218..986932196 100644 --- a/include/boost/geometry/strategy/spherical/envelope_range.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_range.hpp @@ -166,7 +166,7 @@ inline bool pole_within(T const& lat_pole, Ring const& ring, return false; } - using point_t = typename geometry::point_type::type; + using point_t = geometry::point_type_t; point_t point; geometry::assign_zero(point); geometry::set<1>(point, lat_pole); @@ -191,8 +191,8 @@ inline void spheroidal_ring(Range const& range, Box& mbr, spheroidal_linestring(closed_range, mbr, envelope_strategy, expand_strategy); - using coord_t = typename geometry::coordinate_type::type; - using point_t = typename geometry::point_type::type; + using coord_t = geometry::coordinate_type_t; + using point_t = geometry::point_type_t; using units_t = typename geometry::detail::cs_angular_units::type; using constants_t = math::detail::constants_on_spheroid; coord_t const two_pi = constants_t::period(); diff --git a/include/boost/geometry/strategy/spherical/envelope_segment.hpp b/include/boost/geometry/strategy/spherical/envelope_segment.hpp index 75db51a76..65a56c01b 100644 --- a/include/boost/geometry/strategy/spherical/envelope_segment.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_segment.hpp @@ -276,12 +276,12 @@ private: CalculationType lat2, Box& mbr) { - typedef typename coordinate_type::type box_coordinate_type; + using box_coordinate_type = coordinate_type_t; - typedef typename helper_geometry + using helper_box_type = typename helper_geometry < Box, box_coordinate_type, Units - >::type helper_box_type; + >::type; helper_box_type helper_mbr; diff --git a/include/boost/geometry/strategy/spherical/expand_point.hpp b/include/boost/geometry/strategy/spherical/expand_point.hpp index e3a879356..48cb9a930 100644 --- a/include/boost/geometry/strategy/spherical/expand_point.hpp +++ b/include/boost/geometry/strategy/spherical/expand_point.hpp @@ -92,11 +92,10 @@ struct point_loop_on_spheroid box_coordinate_type p_lon = geometry::get<0>(box_point); box_coordinate_type p_lat = geometry::get<1>(box_point); - typename coordinate_type::type - b_lon_min = geometry::get(box), - b_lat_min = geometry::get(box), - b_lon_max = geometry::get(box), - b_lat_max = geometry::get(box); + box_coordinate_type b_lon_min = geometry::get(box); + box_coordinate_type b_lat_min = geometry::get(box); + box_coordinate_type b_lon_max = geometry::get(box); + box_coordinate_type b_lat_max = geometry::get(box); if (math::is_latitude_pole(p_lat)) { diff --git a/include/boost/geometry/util/calculation_type.hpp b/include/boost/geometry/util/calculation_type.hpp index b238dde37..bc140b4cd 100644 --- a/include/boost/geometry/util/calculation_type.hpp +++ b/include/boost/geometry/util/calculation_type.hpp @@ -108,7 +108,7 @@ struct unary { typedef typename detail::calculation_type < - typename geometry::coordinate_type::type, + geometry::coordinate_type_t, CalculationType, DefaultFloatingPointCalculationType, DefaultIntegralCalculationType @@ -153,7 +153,7 @@ struct ternary < typename select_most_precise < - typename coordinate_type::type, + coordinate_type_t, typename select_coordinate_type < Geometry2, diff --git a/include/boost/geometry/util/has_infinite_coordinate.hpp b/include/boost/geometry/util/has_infinite_coordinate.hpp index 22113e89d..e4f676775 100644 --- a/include/boost/geometry/util/has_infinite_coordinate.hpp +++ b/include/boost/geometry/util/has_infinite_coordinate.hpp @@ -46,7 +46,7 @@ bool has_infinite_coordinate(Point const& point) detail::isinf, std::is_floating_point < - typename coordinate_type::type + coordinate_type_t >::value >::apply(point); } diff --git a/include/boost/geometry/util/has_nan_coordinate.hpp b/include/boost/geometry/util/has_nan_coordinate.hpp index d3fc9f195..1a487e266 100644 --- a/include/boost/geometry/util/has_nan_coordinate.hpp +++ b/include/boost/geometry/util/has_nan_coordinate.hpp @@ -88,7 +88,7 @@ bool has_nan_coordinate(Point const& point) detail::isnan, std::is_floating_point < - typename coordinate_type::type + coordinate_type_t >::value >::apply(point); } diff --git a/include/boost/geometry/util/has_non_finite_coordinate.hpp b/include/boost/geometry/util/has_non_finite_coordinate.hpp index df6990a15..e141c010a 100644 --- a/include/boost/geometry/util/has_non_finite_coordinate.hpp +++ b/include/boost/geometry/util/has_non_finite_coordinate.hpp @@ -46,7 +46,7 @@ bool has_non_finite_coordinate(Point const& point) detail::is_not_finite, std::is_floating_point < - typename coordinate_type::type + coordinate_type_t >::value >::apply(point); } diff --git a/include/boost/geometry/util/select_coordinate_type.hpp b/include/boost/geometry/util/select_coordinate_type.hpp index 99f59784f..370c936fb 100644 --- a/include/boost/geometry/util/select_coordinate_type.hpp +++ b/include/boost/geometry/util/select_coordinate_type.hpp @@ -35,10 +35,10 @@ namespace boost { namespace geometry template struct select_coordinate_type { - typedef typename select_most_precise + using type = typename select_most_precise < - typename coordinate_type::type... - >::type type; + coordinate_type_t... + >::type; }; diff --git a/include/boost/geometry/views/box_view.hpp b/include/boost/geometry/views/box_view.hpp index 634af89c8..49338b3eb 100644 --- a/include/boost/geometry/views/box_view.hpp +++ b/include/boost/geometry/views/box_view.hpp @@ -63,7 +63,7 @@ namespace boost { namespace geometry template struct box_view { - using array_t = std::array::type, 5>; + using array_t = std::array, 5>; using iterator = typename array_t::const_iterator; using const_iterator = typename array_t::const_iterator; diff --git a/include/boost/geometry/views/detail/indexed_point_view.hpp b/include/boost/geometry/views/detail/indexed_point_view.hpp index e5a89c9ae..a7825cdc8 100644 --- a/include/boost/geometry/views/detail/indexed_point_view.hpp +++ b/include/boost/geometry/views/detail/indexed_point_view.hpp @@ -37,8 +37,8 @@ class indexed_point_view indexed_point_view & operator=(indexed_point_view const&); public: - 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; indexed_point_view(Geometry & geometry) : m_geometry(geometry) @@ -69,13 +69,13 @@ namespace traits template struct tag< geometry::detail::indexed_point_view > { - typedef point_tag type; + using type = point_tag; }; template struct coordinate_type< geometry::detail::indexed_point_view > { - typedef typename geometry::coordinate_type::type type; + using type = geometry::coordinate_type_t; }; template @@ -84,7 +84,7 @@ struct coordinate_system geometry::detail::indexed_point_view > { - typedef typename geometry::coordinate_system::type type; + using type = geometry::coordinate_system_t; }; template @@ -98,7 +98,7 @@ struct access geometry::detail::indexed_point_view, Dimension > { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; static inline coordinate_type get( geometry::detail::indexed_point_view const& p) diff --git a/include/boost/geometry/views/detail/two_dimensional_view.hpp b/include/boost/geometry/views/detail/two_dimensional_view.hpp index bc8c4467c..0b5c09e55 100644 --- a/include/boost/geometry/views/detail/two_dimensional_view.hpp +++ b/include/boost/geometry/views/detail/two_dimensional_view.hpp @@ -95,7 +95,7 @@ struct coordinate_system < Point, Dimension1, Dimension2, point_tag > - > : coordinate_system::type> + > : coordinate_system> {}; template @@ -105,7 +105,7 @@ struct coordinate_type < Point, Dimension1, Dimension2, point_tag > - > : coordinate_type::type> + > : coordinate_type> {}; template @@ -127,7 +127,7 @@ struct point_type > > { - typedef typename geometry::point_type::type type; + using type = geometry::point_type_t; }; @@ -141,7 +141,7 @@ struct access 0 > { - typedef typename geometry::coordinate_type::type coordinate_type; + using coordinate_type = geometry::coordinate_type_t; typedef geometry::detail::two_dimensional_view < Point, Dimension1, Dimension2, point_tag @@ -168,11 +168,11 @@ struct access 1 > { - typedef typename geometry::coordinate_type::type coordinate_type; - typedef geometry::detail::two_dimensional_view + using coordinate_type = geometry::coordinate_type_t; + using view_type = geometry::detail::two_dimensional_view < Point, Dimension1, Dimension2, point_tag - > view_type; + >; static inline coordinate_type get(view_type const& view) { diff --git a/include/boost/geometry/views/segment_view.hpp b/include/boost/geometry/views/segment_view.hpp index 07dffe590..4423ead6c 100644 --- a/include/boost/geometry/views/segment_view.hpp +++ b/include/boost/geometry/views/segment_view.hpp @@ -59,7 +59,7 @@ namespace boost { namespace geometry template struct segment_view { - using array_t = std::array::type, 2>; + using array_t = std::array, 2>; using iterator = typename array_t::const_iterator; using const_iterator = typename array_t::const_iterator; diff --git a/test/algorithms/distance/test_distance.hpp b/test/algorithms/distance/test_distance.hpp index cfda00e29..a34770a4a 100644 --- a/test/algorithms/distance/test_distance.hpp +++ b/test/algorithms/distance/test_distance.hpp @@ -51,7 +51,7 @@ struct tag template struct return_type { - typedef typename coordinate_type::type type; + using type = coordinate_type_t; }; @@ -74,7 +74,7 @@ template struct result_from_distance { template - static inline typename coordinate_type::type apply(taxicab_distance const& , T const& value) + static inline coordinate_type_t apply(taxicab_distance const& , T const& value) { return value; }