From 8ca368c9d28a44649a37b6319751523857a13445 Mon Sep 17 00:00:00 2001 From: Vissarion Fisikopoulos Date: Tue, 22 Oct 2024 13:55:29 +0300 Subject: [PATCH] chore: modernize codebase by replacing typedef with using --- .../boost/geometry/algorithms/area_result.hpp | 2 +- .../boost/geometry/algorithms/centroid.hpp | 5 +- .../algorithms/detail/assign_values.hpp | 10 +- .../algorithms/detail/buffer/buffer_box.hpp | 2 +- .../detail/buffer/buffer_inserter.hpp | 2 +- .../detail/buffer/buffer_policies.hpp | 4 +- .../buffer/buffered_piece_collection.hpp | 27 ++-- .../detail/buffer/buffered_ring.hpp | 8 +- .../detail/buffer/get_piece_turns.hpp | 5 +- .../algorithms/detail/buffer/piece_border.hpp | 4 +- .../detail/calculate_point_order.hpp | 4 +- .../centroid/translating_transformer.hpp | 2 +- .../detail/closest_feature/range_to_range.hpp | 6 +- .../range_to_geometry_rtree.hpp | 4 +- .../detail/convert_indexed_to_indexed.hpp | 2 +- .../detail/convert_point_to_point.hpp | 2 +- .../detail/convex_hull/graham_andrew.hpp | 2 +- .../algorithms/detail/disjoint/box_box.hpp | 2 +- .../detail/disjoint/multipoint_geometry.hpp | 4 +- .../algorithms/detail/disjoint/point_box.hpp | 2 +- .../detail/disjoint/point_point.hpp | 2 +- .../detail/disjoint/segment_box.hpp | 2 +- .../distance/geometry_to_segment_or_box.hpp | 9 +- .../algorithms/detail/distance/interface.hpp | 13 +- .../detail/distance/iterator_selector.hpp | 2 +- .../distance/linear_or_areal_to_areal.hpp | 4 +- .../detail/distance/linear_to_box.hpp | 2 +- .../detail/distance/linear_to_linear.hpp | 2 +- .../distance/multipoint_to_geometry.hpp | 4 +- .../detail/distance/point_to_geometry.hpp | 20 +-- .../distance/range_to_geometry_rtree.hpp | 8 +- .../detail/distance/segment_to_box.hpp | 26 ++-- .../detail/distance/segment_to_segment.hpp | 4 +- .../algorithms/detail/dummy_geometries.hpp | 2 +- .../algorithms/detail/envelope/initialize.hpp | 2 +- .../envelope/intersects_antimeridian.hpp | 5 +- .../detail/envelope/range_of_boxes.hpp | 17 +-- .../detail/equals/collect_vectors.hpp | 12 +- .../detail/equals/implementation.hpp | 2 +- .../algorithms/detail/expand/indexed.hpp | 6 +- .../algorithms/detail/expand_by_epsilon.hpp | 4 +- .../algorithms/detail/interior_iterator.hpp | 4 +- .../detail/intersection/areal_areal.hpp | 20 +-- .../detail/intersects/implementation.hpp | 7 +- .../detail/is_simple/multipoint.hpp | 7 +- .../detail/is_valid/complement_graph.hpp | 8 +- .../detail/is_valid/multipolygon.hpp | 5 +- .../algorithms/detail/is_valid/polygon.hpp | 10 +- .../algorithms/detail/max_interval_gap.hpp | 8 +- .../detail/overlaps/implementation.hpp | 4 +- .../detail/overlay/assign_parents.hpp | 8 +- .../detail/overlay/backtrack_check_si.hpp | 2 +- .../detail/overlay/clip_linestring.hpp | 8 +- .../algorithms/detail/overlay/follow.hpp | 12 +- .../detail/overlay/follow_linear_linear.hpp | 25 +--- .../overlay/get_intersection_points.hpp | 7 +- .../detail/overlay/get_turn_info.hpp | 7 +- .../overlay/get_turn_info_for_endpoint.hpp | 2 +- .../detail/overlay/get_turn_info_helpers.hpp | 34 ++--- .../detail/overlay/get_turn_info_la.hpp | 9 +- .../detail/overlay/get_turn_info_ll.hpp | 7 +- .../algorithms/detail/overlay/get_turns.hpp | 23 ++-- .../detail/overlay/handle_colocations.hpp | 4 +- .../detail/overlay/intersection_insert.hpp | 35 +---- .../detail/overlay/less_by_segment_ratio.hpp | 2 +- .../detail/overlay/linear_linear.hpp | 2 +- .../algorithms/detail/overlay/overlay.hpp | 17 +-- .../detail/overlay/pointlike_areal.hpp | 12 +- .../detail/overlay/pointlike_linear.hpp | 8 +- .../detail/overlay/pointlike_pointlike.hpp | 4 +- .../detail/overlay/range_in_geometry.hpp | 4 +- .../detail/overlay/ring_properties.hpp | 4 +- .../detail/overlay/self_turn_points.hpp | 6 +- .../algorithms/detail/overlay/traversal.hpp | 8 +- .../detail/overlay/traversal_ring_creator.hpp | 10 +- .../algorithms/detail/overlay/turn_info.hpp | 12 +- .../detail/point_is_spike_or_equal.hpp | 2 +- .../algorithms/detail/relate/areal_areal.hpp | 2 +- .../algorithms/detail/relate/de9im.hpp | 22 ++- .../detail/relate/follow_helpers.hpp | 4 +- .../algorithms/detail/relate/linear_areal.hpp | 6 +- .../detail/relate/linear_linear.hpp | 2 +- .../detail/relate/multi_point_geometry.hpp | 6 +- .../detail/relate/point_geometry.hpp | 2 +- .../algorithms/detail/relate/point_point.hpp | 2 +- .../algorithms/detail/relate/result.hpp | 21 ++- .../algorithms/detail/relate/turns.hpp | 4 +- .../algorithms/detail/relation/interface.hpp | 2 +- .../algorithms/detail/signed_size_type.hpp | 2 +- .../algorithms/detail/single_geometry.hpp | 2 +- .../geometry/algorithms/detail/sub_range.hpp | 4 +- .../geometry/algorithms/detail/sweep.hpp | 2 +- .../detail/touches/implementation.hpp | 11 +- .../algorithms/detail/tupled_output.hpp | 6 +- .../algorithms/detail/within/multi_point.hpp | 6 +- .../detail/within/point_in_geometry.hpp | 2 +- .../boost/geometry/algorithms/difference.hpp | 5 +- .../discrete_hausdorff_distance.hpp | 7 +- .../geometry/algorithms/dispatch/distance.hpp | 2 +- .../boost/geometry/algorithms/for_each.hpp | 19 +-- include/boost/geometry/algorithms/length.hpp | 4 +- .../geometry/algorithms/line_interpolate.hpp | 3 +- .../boost/geometry/algorithms/perimeter.hpp | 2 +- .../geometry/algorithms/remove_spikes.hpp | 2 +- .../boost/geometry/algorithms/simplify.hpp | 9 +- .../geometry/algorithms/sym_difference.hpp | 5 +- include/boost/geometry/algorithms/unique.hpp | 4 +- .../boost/geometry/arithmetic/dot_product.hpp | 4 +- .../boost/geometry/arithmetic/normalize.hpp | 4 +- .../geometry/core/coordinate_promotion.hpp | 11 +- .../boost/geometry/core/coordinate_system.hpp | 4 +- include/boost/geometry/core/cs.hpp | 22 +-- include/boost/geometry/core/interior_type.hpp | 12 +- include/boost/geometry/core/radian_access.hpp | 8 +- include/boost/geometry/core/tag.hpp | 2 +- include/boost/geometry/core/tags.hpp | 6 +- .../extensions/algebra/algorithms/assign.hpp | 2 +- .../extensions/algebra/algorithms/convert.hpp | 2 +- .../geometries/concepts/matrix_concept.hpp | 4 +- .../concepts/rotation_matrix_concept.hpp | 8 +- .../concepts/rotation_quaternion_concept.hpp | 8 +- .../geometries/concepts/vector_concept.hpp | 8 +- .../extensions/algebra/geometries/matrix.hpp | 6 +- .../algebra/geometries/quaternion.hpp | 4 +- .../algebra/geometries/rotation_matrix.hpp | 8 +- .../geometries/rotation_quaternion.hpp | 6 +- .../extensions/algebra/geometries/vector.hpp | 6 +- .../extensions/algorithms/connect.hpp | 24 ++-- .../algorithms/detail/overlay/dissolver.hpp | 13 +- .../algorithms/detail/overlay/split_rings.hpp | 20 +-- .../extensions/algorithms/dissolve.hpp | 6 +- .../extensions/algorithms/midpoints.hpp | 2 +- .../geometry/extensions/algorithms/offset.hpp | 7 +- .../extensions/algorithms/offset_appender.hpp | 2 +- .../extensions/algorithms/remove_marked.hpp | 6 +- .../extensions/algorithms/selected.hpp | 6 +- .../geometry/extensions/astronomy/core/cs.hpp | 2 +- .../extensions/gis/geographic/core/cs.hpp | 2 +- .../strategies/area_huiller_earth.hpp | 2 +- .../gis/io/shapelib/shp_read_object.hpp | 2 +- .../gis/io/veshape/write_veshape.hpp | 2 +- .../extensions/gis/io/wkb/detail/endian.hpp | 8 +- .../extensions/gis/io/wkb/detail/parser.hpp | 8 +- .../extensions/gis/io/wkb/detail/writer.hpp | 2 +- .../extensions/gis/latlong/point_ll.hpp | 22 +-- .../geometry/extensions/index/rtree/rtree.hpp | 12 +- .../extensions/index/rtree/rtree_leaf.hpp | 2 +- .../extensions/index/rtree/rtree_node.hpp | 6 +- .../iterators/segment_returning_iterator.hpp | 16 +-- .../multi/gis/io/wkb/detail/parser.hpp | 6 +- .../multi/gis/io/wkb/detail/writer.hpp | 2 +- .../extensions/nsphere/algorithms/area.hpp | 6 +- .../extensions/nsphere/algorithms/assign.hpp | 4 +- .../nsphere/algorithms/disjoint.hpp | 4 +- .../extensions/nsphere/algorithms/expand.hpp | 2 +- .../extensions/nsphere/algorithms/within.hpp | 2 +- .../nsphere/core/replace_point_type.hpp | 2 +- .../geometries/concepts/nsphere_concept.hpp | 10 +- .../extensions/nsphere/geometries/nsphere.hpp | 14 +- .../algorithms/comparable_distance_near.hpp | 2 +- .../index/detail/algorithms/margin.hpp | 2 +- .../rtree/linear/redistribute_elements.hpp | 8 +- .../nsphere/strategies/cartesian/disjoint.hpp | 2 +- .../strategies/cartesian/nsphere_in_box.hpp | 4 +- .../extensions/nsphere/views/center_view.hpp | 2 +- .../strategies/cartesian/distance_info.hpp | 14 +- .../geometry/formulas/andoyer_inverse.hpp | 2 +- .../boost/geometry/formulas/geographic.hpp | 24 ++-- .../formulas/gnomonic_intersection.hpp | 4 +- .../geometry/formulas/gnomonic_spheroid.hpp | 10 +- .../formulas/interpolate_point_spherical.hpp | 2 +- .../boost/geometry/formulas/karney_direct.hpp | 2 +- .../geometry/formulas/karney_inverse.hpp | 2 +- .../geometry/formulas/meridian_direct.hpp | 2 +- .../formulas/sjoberg_intersection.hpp | 6 +- include/boost/geometry/formulas/spherical.hpp | 10 +- .../boost/geometry/formulas/thomas_direct.hpp | 2 +- .../geometry/formulas/thomas_inverse.hpp | 2 +- .../boost/geometry/formulas/unit_spheroid.hpp | 2 +- .../geometry/formulas/vincenty_direct.hpp | 2 +- .../geometry/formulas/vincenty_inverse.hpp | 2 +- .../geometries/adapted/boost_array.hpp | 4 +- .../adapted/boost_polygon/hole_iterator.hpp | 2 +- .../adapted/boost_polygon/holes_proxy.hpp | 10 +- .../adapted/boost_polygon/ring_proxy.hpp | 8 +- .../geometry/geometries/adapted/c_array.hpp | 6 +- .../geometry/geometries/adapted/std_array.hpp | 4 +- include/boost/geometry/geometries/box.hpp | 6 +- .../geometries/concepts/point_concept.hpp | 8 +- .../geometries/geometry_collection.hpp | 2 +- .../geometry/geometries/helper_geometry.hpp | 6 +- .../boost/geometry/geometries/linestring.hpp | 4 +- .../geometry/geometries/multi_linestring.hpp | 4 +- .../boost/geometry/geometries/multi_point.hpp | 4 +- .../geometry/geometries/multi_polygon.hpp | 4 +- include/boost/geometry/geometries/point.hpp | 8 +- .../boost/geometry/geometries/point_xy.hpp | 8 +- .../boost/geometry/geometries/point_xyz.hpp | 8 +- .../geometry/geometries/pointing_segment.hpp | 8 +- include/boost/geometry/geometries/polygon.hpp | 49 ++----- include/boost/geometry/geometries/ring.hpp | 4 +- include/boost/geometry/geometries/segment.hpp | 14 +- .../boost/geometry/index/adaptors/query.hpp | 4 +- .../comparable_distance_centroid.hpp | 4 +- .../algorithms/comparable_distance_far.hpp | 4 +- .../algorithms/comparable_distance_near.hpp | 4 +- .../index/detail/algorithms/minmaxdist.hpp | 4 +- .../algorithms/segment_intersection.hpp | 4 +- .../algorithms/smallest_for_indexable.hpp | 8 +- .../detail/algorithms/sum_for_indexable.hpp | 8 +- .../geometry/index/detail/bounded_view.hpp | 13 +- .../index/detail/distance_predicates.hpp | 16 +-- include/boost/geometry/index/detail/meta.hpp | 30 ++--- .../geometry/index/detail/predicates.hpp | 2 +- .../geometry/index/detail/rtree/adaptors.hpp | 6 +- .../geometry/index/detail/rtree/iterators.hpp | 24 ++-- .../index/detail/rtree/kmeans/split.hpp | 18 +-- .../rtree/linear/redistribute_elements.hpp | 55 +++----- .../geometry/index/detail/rtree/node/node.hpp | 16 +-- .../index/detail/rtree/node/node_elements.hpp | 6 +- .../index/detail/rtree/node/pairs.hpp | 4 +- .../detail/rtree/node/scoped_deallocator.hpp | 4 +- .../detail/rtree/node/subtree_destroyer.hpp | 6 +- .../detail/rtree/node/variant_dynamic.hpp | 54 ++++---- .../detail/rtree/node/variant_static.hpp | 40 +++--- .../index/detail/rtree/node/weak_dynamic.hpp | 82 ++++-------- .../index/detail/rtree/node/weak_static.hpp | 54 +++----- .../index/detail/rtree/node/weak_visitor.hpp | 4 +- .../geometry/index/detail/rtree/options.hpp | 12 +- .../index/detail/rtree/pack_create.hpp | 24 ++-- .../rtree/quadratic/redistribute_elements.hpp | 25 ++-- .../index/detail/rtree/query_iterators.hpp | 70 +++++----- .../detail/rtree/rstar/choose_next_node.hpp | 12 +- .../index/detail/rtree/rstar/insert.hpp | 85 ++++++------ .../rtree/rstar/redistribute_elements.hpp | 31 ++--- .../detail/rtree/utilities/are_boxes_ok.hpp | 12 +- .../detail/rtree/utilities/are_counts_ok.hpp | 8 +- .../detail/rtree/utilities/are_levels_ok.hpp | 6 +- .../index/detail/rtree/utilities/gl_draw.hpp | 10 +- .../index/detail/rtree/utilities/print.hpp | 8 +- .../detail/rtree/utilities/statistics.hpp | 6 +- .../index/detail/rtree/utilities/view.hpp | 14 +- .../detail/rtree/visitors/children_box.hpp | 10 +- .../index/detail/rtree/visitors/copy.hpp | 12 +- .../index/detail/rtree/visitors/count.hpp | 14 +- .../index/detail/rtree/visitors/destroy.hpp | 10 +- .../detail/rtree/visitors/distance_query.hpp | 76 ++++++----- .../index/detail/rtree/visitors/insert.hpp | 32 ++--- .../index/detail/rtree/visitors/is_leaf.hpp | 4 +- .../index/detail/rtree/visitors/iterator.hpp | 6 +- .../index/detail/rtree/visitors/remove.hpp | 26 ++-- .../detail/rtree/visitors/spatial_query.hpp | 36 ++--- .../geometry/index/detail/serialization.hpp | 92 ++++++------- .../geometry/index/detail/translator.hpp | 4 +- .../boost/geometry/index/detail/varray.hpp | 125 ++++++++---------- .../geometry/index/detail/varray_detail.hpp | 11 +- include/boost/geometry/index/equal_to.hpp | 4 +- include/boost/geometry/index/indexable.hpp | 8 +- include/boost/geometry/index/inserter.hpp | 12 +- include/boost/geometry/index/parameters.hpp | 8 +- include/boost/geometry/index/rtree.hpp | 105 ++++++--------- include/boost/geometry/io/dsv/write.hpp | 2 +- include/boost/geometry/io/svg/svg_mapper.hpp | 2 +- include/boost/geometry/io/svg/write.hpp | 4 +- .../geometry/iterators/closing_iterator.hpp | 9 +- .../iterators/concatenate_iterator.hpp | 4 +- .../point_iterator/inner_range_type.hpp | 4 +- .../detail/point_iterator/value_type.hpp | 4 +- .../range_segment_iterator.hpp | 7 +- .../detail/segment_iterator/value_type.hpp | 4 +- .../iterators/ever_circling_iterator.hpp | 7 +- .../geometry/iterators/flatten_iterator.hpp | 4 +- .../iterators/point_reverse_iterator.hpp | 2 +- .../geometry/iterators/segment_iterator.hpp | 2 +- .../geometry/policies/relate/direction.hpp | 2 +- .../policies/relate/intersection_points.hpp | 2 +- .../policies/relate/intersection_policy.hpp | 11 +- .../policies/relate/intersection_ratios.hpp | 2 +- include/boost/geometry/srs/projection.hpp | 12 +- .../boost/geometry/srs/projections/dpar.hpp | 10 +- .../geometry/srs/projections/factory.hpp | 17 +-- .../boost/geometry/srs/projections/grids.hpp | 10 +- .../srs/projections/impl/base_dynamic.hpp | 4 +- .../srs/projections/impl/pj_ell_set.hpp | 18 +-- .../geometry/srs/projections/impl/pj_fwd.hpp | 2 +- .../srs/projections/impl/pj_gridinfo.hpp | 4 +- .../geometry/srs/projections/impl/pj_inv.hpp | 2 +- .../srs/projections/impl/pj_param.hpp | 2 +- .../srs/projections/impl/pj_transform.hpp | 20 +-- .../srs/projections/impl/projects.hpp | 2 +- .../geometry/srs/projections/par_data.hpp | 26 ++-- .../geometry/srs/projections/proj/aeqd.hpp | 2 +- .../geometry/srs/projections/proj/merc.hpp | 2 +- .../geometry/srs/projections/proj/nzmg.hpp | 2 +- .../geometry/srs/projections/proj/ob_tran.hpp | 2 +- .../boost/geometry/srs/projections/spar.hpp | 46 +++---- include/boost/geometry/srs/shared_grids.hpp | 2 +- .../boost/geometry/srs/shared_grids_boost.hpp | 2 +- .../boost/geometry/srs/shared_grids_std.hpp | 4 +- include/boost/geometry/srs/sphere.hpp | 6 +- include/boost/geometry/srs/spheroid.hpp | 6 +- include/boost/geometry/srs/transformation.hpp | 16 +-- .../point_in_poly_oriented_winding.hpp | 13 +- .../agnostic/point_in_poly_winding.hpp | 5 +- .../agnostic/simplify_douglas_peucker.hpp | 2 +- .../geometry/strategies/cartesian/azimuth.hpp | 4 +- .../strategies/cartesian/box_in_box.hpp | 12 +- .../strategies/cartesian/buffer_end_round.hpp | 4 +- .../cartesian/buffer_join_miter.hpp | 2 +- .../cartesian/buffer_join_round.hpp | 2 +- .../cartesian/buffer_join_round_by_divide.hpp | 2 +- .../cartesian/buffer_side_straight.hpp | 2 +- .../strategies/cartesian/centroid_average.hpp | 8 +- .../cartesian/centroid_bashein_detmer.hpp | 14 +- .../cartesian/centroid_weighted_length.hpp | 21 +-- .../geometry/strategies/cartesian/densify.hpp | 14 +- .../strategies/cartesian/disjoint_box_box.hpp | 2 +- .../cartesian/disjoint_segment_box.hpp | 11 +- .../cartesian/distance_projected_point.hpp | 17 +-- .../cartesian/distance_projected_point_ax.hpp | 37 ++---- .../cartesian/distance_pythagoras.hpp | 18 +-- .../cartesian/distance_pythagoras_box_box.hpp | 24 ++-- .../distance_pythagoras_point_box.hpp | 24 ++-- .../cartesian/distance_segment_box.hpp | 27 +--- .../strategies/cartesian/intersection.hpp | 25 ++-- .../strategies/cartesian/line_interpolate.hpp | 9 +- .../strategies/cartesian/point_in_box.hpp | 11 +- .../strategies/cartesian/point_in_point.hpp | 6 +- .../point_in_poly_crossings_multiply.hpp | 4 +- .../cartesian/point_in_poly_franklin.hpp | 4 +- .../cartesian/point_in_poly_winding.hpp | 8 +- .../strategies/cartesian/point_order.hpp | 4 +- .../boost/geometry/strategies/centroid.hpp | 2 +- .../strategies/comparable_distance_result.hpp | 2 +- .../strategies/concepts/area_concept.hpp | 4 +- .../strategies/concepts/centroid_concept.hpp | 6 +- .../concepts/convex_hull_concept.hpp | 6 +- .../strategies/concepts/distance_concept.hpp | 20 +-- .../concepts/segment_intersect_concept.hpp | 6 +- .../strategies/concepts/simplify_concept.hpp | 6 +- .../strategies/concepts/within_concept.hpp | 42 ++---- .../boost/geometry/strategies/convex_hull.hpp | 2 +- include/boost/geometry/strategies/detail.hpp | 10 +- .../geometry/strategies/distance_result.hpp | 2 +- .../strategies/geographic/azimuth.hpp | 18 +-- .../strategies/geographic/densify.hpp | 8 +- .../geographic/disjoint_segment_box.hpp | 6 +- .../strategies/geographic/distance.hpp | 8 +- .../geographic/distance_andoyer.hpp | 9 +- .../geographic/distance_cross_track.hpp | 18 +-- .../distance_cross_track_box_box.hpp | 27 ++-- .../distance_cross_track_point_box.hpp | 20 +-- .../strategies/geographic/distance_karney.hpp | 9 +- .../geographic/distance_segment_box.hpp | 28 ++-- .../strategies/geographic/distance_thomas.hpp | 9 +- .../geographic/distance_vincenty.hpp | 9 +- .../geographic/intersection_elliptic.hpp | 6 +- .../geographic/line_interpolate.hpp | 14 +- .../strategies/geographic/mapping_ssf.hpp | 19 +-- .../strategies/geographic/point_order.hpp | 6 +- .../geometry/strategies/geographic/side.hpp | 18 +-- .../strategies/geographic/side_andoyer.hpp | 2 +- .../strategies/geographic/side_thomas.hpp | 2 +- .../strategies/geographic/side_vincenty.hpp | 2 +- .../geometry/strategies/index/geographic.hpp | 2 +- .../strategies/intersection_result.hpp | 2 +- .../strategies/intersection_strategies.hpp | 11 +- .../geometry/strategies/io/cartesian.hpp | 2 +- .../geometry/strategies/io/geographic.hpp | 2 +- .../geometry/strategies/io/spherical.hpp | 2 +- .../boost/geometry/strategies/normalize.hpp | 4 +- .../geometry/strategies/spherical/azimuth.hpp | 4 +- .../geometry/strategies/spherical/compare.hpp | 8 +- .../geometry/strategies/spherical/densify.hpp | 4 +- .../strategies/spherical/disjoint_box_box.hpp | 4 +- .../spherical/disjoint_segment_box.hpp | 4 +- .../distance_cross_track_box_box.hpp | 32 ++--- .../distance_cross_track_point_box.hpp | 32 ++--- .../spherical/distance_haversine.hpp | 18 +-- .../spherical/distance_segment_box.hpp | 41 ++---- .../strategies/spherical/get_radius.hpp | 2 +- .../strategies/spherical/intersection.hpp | 25 ++-- .../strategies/spherical/line_interpolate.hpp | 10 +- .../strategies/spherical/point_in_point.hpp | 10 +- .../spherical/point_in_poly_winding.hpp | 24 ++-- .../strategies/spherical/point_order.hpp | 4 +- .../spherical/side_by_cross_track.hpp | 12 +- .../geometry/strategies/spherical/ssf.hpp | 13 +- .../strategies/strategy_transform.hpp | 14 +- .../strategies/transform/map_transformer.hpp | 6 +- .../transform/matrix_transformers.hpp | 10 +- include/boost/geometry/strategy/area.hpp | 2 +- .../geometry/strategy/cartesian/area.hpp | 6 +- .../geometry/strategy/cartesian/area_box.hpp | 2 +- .../geometry/strategy/cartesian/envelope.hpp | 4 +- .../strategy/cartesian/envelope_box.hpp | 4 +- .../cartesian/envelope_multipoint.hpp | 2 +- .../strategy/cartesian/envelope_point.hpp | 2 +- .../strategy/cartesian/envelope_segment.hpp | 2 +- .../strategy/cartesian/expand_box.hpp | 2 +- .../strategy/cartesian/expand_point.hpp | 7 +- .../strategy/cartesian/expand_segment.hpp | 2 +- .../strategy/cartesian/precise_area.hpp | 4 +- .../strategy/cartesian/side_non_robust.hpp | 14 +- .../strategy/cartesian/side_robust.hpp | 2 +- .../geometry/strategy/geographic/area.hpp | 2 +- .../geometry/strategy/geographic/area_box.hpp | 2 +- .../geometry/strategy/geographic/envelope.hpp | 4 +- .../strategy/geographic/envelope_segment.hpp | 2 +- include/boost/geometry/strategy/relate.hpp | 2 +- .../geometry/strategy/spherical/area.hpp | 9 +- .../geometry/strategy/spherical/area_box.hpp | 2 +- .../geometry/strategy/spherical/envelope.hpp | 4 +- .../strategy/spherical/envelope_box.hpp | 4 +- .../spherical/envelope_multipoint.hpp | 7 +- .../strategy/spherical/envelope_point.hpp | 7 +- .../strategy/spherical/envelope_range.hpp | 2 +- .../strategy/spherical/envelope_segment.hpp | 21 +-- .../strategy/spherical/expand_box.hpp | 2 +- .../strategy/spherical/expand_point.hpp | 2 +- .../strategy/spherical/expand_segment.hpp | 2 +- .../boost/geometry/util/calculation_type.hpp | 14 +- include/boost/geometry/util/math.hpp | 4 +- .../normalize_spheroidal_box_coordinates.hpp | 4 +- .../util/normalize_spheroidal_coordinates.hpp | 29 +--- .../boost/geometry/util/parameter_type_of.hpp | 4 +- .../boost/geometry/util/promote_integral.hpp | 11 +- include/boost/geometry/util/range.hpp | 12 +- .../geometry/util/select_calculation_type.hpp | 8 +- .../geometry/util/select_coordinate_type.hpp | 5 +- .../geometry/util/select_most_precise.hpp | 10 +- include/boost/geometry/util/sequence.hpp | 2 +- include/boost/geometry/util/tuples.hpp | 8 +- include/boost/geometry/views/box_view.hpp | 2 +- .../detail/boundary_view/implementation.hpp | 18 +-- .../views/detail/boundary_view/interface.hpp | 5 +- .../views/detail/indexed_point_view.hpp | 2 +- .../views/detail/two_dimensional_view.hpp | 7 +- include/boost/geometry/views/segment_view.hpp | 2 +- 439 files changed, 1758 insertions(+), 2587 deletions(-) diff --git a/include/boost/geometry/algorithms/area_result.hpp b/include/boost/geometry/algorithms/area_result.hpp index 73d9f52c5d..d74b9cb4a9 100644 --- a/include/boost/geometry/algorithms/area_result.hpp +++ b/include/boost/geometry/algorithms/area_result.hpp @@ -51,7 +51,7 @@ struct area_result template struct area_result { - typedef typename Strategy::template result_type::type type; + using type = typename Strategy::template result_type::type; }; diff --git a/include/boost/geometry/algorithms/centroid.hpp b/include/boost/geometry/algorithms/centroid.hpp index 1817d8addc..663ae92351 100644 --- a/include/boost/geometry/algorithms/centroid.hpp +++ b/include/boost/geometry/algorithms/centroid.hpp @@ -113,10 +113,7 @@ struct centroid_indexed static inline void apply(Indexed const& indexed, Point& centroid, Strategy const&) { - typedef typename select_coordinate_type - < - Indexed, Point - >::type coordinate_type; + using coordinate_type = int; detail::for_each_dimension([&](auto dimension) { diff --git a/include/boost/geometry/algorithms/detail/assign_values.hpp b/include/boost/geometry/algorithms/detail/assign_values.hpp index fe72bc5683..dc63612aeb 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 = int; 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 = int; 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 = int; 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 = int; 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 = int; // Here we assign 4 coordinates to a box of segment // -> Most logical is: x1,y1,x2,y2 diff --git a/include/boost/geometry/algorithms/detail/buffer/buffer_box.hpp b/include/boost/geometry/algorithms/detail/buffer/buffer_box.hpp index f19a91d6ba..64b78909ed 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 = int; static inline void apply(BoxIn const& box_in, T const& distance, BoxOut& box_out) { diff --git a/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp b/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp index 1e6b798cd3..3d68e363d0 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp @@ -469,7 +469,7 @@ struct buffer_inserter_ring { output_point_type first_p1, first_p2, last_p1, last_p2; - typedef detail::buffer::buffer_range buffer_range; + using buffer_range = detail::buffer::buffer_range; geometry::strategy::buffer::result_code result = buffer_range::iterate(collection, begin, end, diff --git a/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp b/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp index e843b27d90..845d71c288 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffer_policies.hpp @@ -39,7 +39,7 @@ namespace detail { namespace buffer class backtrack_for_buffer { public : - typedef detail::overlay::backtrack_state state_type; + using state_type = int; template < @@ -148,7 +148,7 @@ struct buffer_turn_info buffer_turn_operation > { - typedef Point point_type; + using point_type = Point; std::size_t turn_index; 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 3f20813b48..164392b82e 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp @@ -128,9 +128,9 @@ struct buffered_piece_collection typedef typename geometry::coordinate_type::type coordinate_type; // Ring/polygon type, always clockwise - typedef geometry::model::ring clockwise_ring_type; + using clockwise_ring_type = int; - typedef geometry::model::box box_type; + using box_type = int; typedef buffer_turn_info < @@ -144,9 +144,9 @@ struct buffered_piece_collection typename segment_ratio_type::type > buffer_turn_operation_type; - typedef std::vector turn_vector_type; + using turn_vector_type = int; - typedef piece_border piece_border_type; + using piece_border_type = int; struct piece { @@ -203,7 +203,7 @@ struct buffered_piece_collection struct original_ring { - typedef geometry::sections sections_type; + using sections_type = int; // Creates an empty instance inline original_ring() @@ -224,7 +224,7 @@ struct buffered_piece_collection // The dimension is critical because the direction is later used // in the optimization for within checks using winding strategy // and this strategy is scanning in x direction. - typedef std::integer_sequence dimensions; + using dimensions = int; geometry::sectionalize < false, dimensions @@ -239,7 +239,7 @@ struct buffered_piece_collection bool m_has_interiors; }; - typedef std::vector piece_vector_type; + using piece_vector_type = int; piece_vector_type m_pieces; turn_vector_type m_turns; @@ -258,15 +258,11 @@ struct buffered_piece_collection segment_identifier current_segment_id; // Monotonic sections (used for offsetted rings around points) - typedef geometry::sections sections_type; + using sections_type = int; sections_type monotonic_sections; // Define the clusters, mapping cluster_id -> turns - typedef std::map - < - signed_size_type, - detail::overlay::cluster_info - > cluster_type; + using cluster_type = int; cluster_type m_clusters; @@ -1069,10 +1065,7 @@ struct buffered_piece_collection < buffered_ring, Strategy >::type area_result_type; - typedef detail::overlay::ring_properties - < - point_type, area_result_type - > properties; + using properties = int; std::map selected; diff --git a/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp index 6118ec43b3..e5f0dbfb52 100644 --- a/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/buffered_ring.hpp @@ -108,7 +108,7 @@ namespace traits template struct tag > { - typedef ring_tag type; + using type = int; }; @@ -135,7 +135,7 @@ struct point_type > template struct tag > { - typedef geometry::detail::buffer::buffered_ring_collection_tag type; + using type = geometry::detail::buffer::buffered_ring_collection_tag; }; @@ -154,7 +154,7 @@ struct ring_type detail::buffer::buffered_ring_collection > { - typedef Ring type; + using type = Ring; }; @@ -177,7 +177,7 @@ struct point_order struct single_tag_of { - typedef ring_tag type; + using type = int; }; 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 3775e604ef..7fb57322d2 100644 --- a/include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/get_piece_turns.hpp @@ -261,10 +261,7 @@ class piece_turn_visitor { unique_sub_range_from_piece unique_sub_range2(ring2, prev2, it2); - typedef detail::overlay::get_turn_info - < - detail::overlay::assign_policy_only_start_turns - > turn_policy; + using turn_policy = int; turn_policy::apply(unique_sub_range1, unique_sub_range2, the_model, diff --git a/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp b/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp index 3861fcbe57..9a32f5ee57 100644 --- a/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp +++ b/include/boost/geometry/algorithms/detail/buffer/piece_border.hpp @@ -104,7 +104,7 @@ template struct piece_border { typedef typename geometry::coordinate_type::type coordinate_type; - typedef typename default_comparable_distance_result::type radius_type; + using radius_type = int; typedef typename geometry::strategy::buffer::turn_in_ring_winding::state_type state_type; bool m_reversed; @@ -475,7 +475,7 @@ private : template inline void calculate_radii(Point const& center, It begin, It end) { - typedef geometry::model::referring_segment segment_type; + using segment_type = int; bool first = true; diff --git a/include/boost/geometry/algorithms/detail/calculate_point_order.hpp b/include/boost/geometry/algorithms/detail/calculate_point_order.hpp index 5dc92a0cce..8092232a48 100644 --- a/include/boost/geometry/algorithms/detail/calculate_point_order.hpp +++ b/include/boost/geometry/algorithms/detail/calculate_point_order.hpp @@ -109,8 +109,8 @@ struct calculate_point_order_by_azimuth static geometry::order_selector apply(Ring const& ring, Strategy const& strategy) { typedef typename boost::range_iterator::type iter_t; - typedef typename Strategy::template result_type::type calc_t; - typedef clean_point clean_point_t; + using calc_t = typename Strategy::template result_type::type; + using clean_point_t = int; calc_t const zero = 0; calc_t const pi = math::pi(); diff --git a/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp b/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp index 6baf19078b..ea79090694 100644 --- a/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp +++ b/include/boost/geometry/algorithms/detail/centroid/translating_transformer.hpp @@ -54,7 +54,7 @@ template struct translating_transformer { typedef typename geometry::point_type::type point_type; - typedef boost::reference_wrapper result_type; + using result_type = int; explicit translating_transformer(Geometry const&) {} explicit translating_transformer(point_type const&) {} diff --git a/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp b/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp index f26af3f264..cb1b27eae8 100644 --- a/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp +++ b/include/boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp @@ -58,7 +58,7 @@ class range_to_range_rtree < index::linear<8>, Strategies > index_parameters_type; - typedef index::rtree rtree_type; + using rtree_type = int; BOOST_GEOMETRY_ASSERT( rtree_first != rtree_last ); BOOST_GEOMETRY_ASSERT( queries_first != queries_last ); @@ -114,9 +114,7 @@ class range_to_range_rtree template struct return_type { - typedef std::pair - < - typename std::iterator_traits::value_type, + using value_type = int, QueryRangeIterator > type; }; diff --git a/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp b/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp index 1bb44b53cd..ee452eb173 100644 --- a/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp +++ b/include/boost/geometry/algorithms/detail/closest_points/range_to_geometry_rtree.hpp @@ -58,9 +58,9 @@ class point_or_segment_range_to_geometry_rtree PointOrSegmentIterator >::value_type point_or_segment_type; - typedef distance::iterator_selector selector_type; + using selector_type = int; - typedef detail::closest_feature::range_to_range_rtree range_to_range; + using range_to_range = int; BOOST_GEOMETRY_ASSERT( first != last ); 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 607fdae009..0c5cdb851f 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 = int; 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 a29ca3fcf4..6565a3d9a0 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 = int; set(destination, util::numeric_cast(get(source))); point_to_point::apply(source, destination); diff --git a/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp b/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp index 20fd09bf58..6ff0be0cd7 100644 --- a/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp +++ b/include/boost/geometry/algorithms/detail/convex_hull/graham_andrew.hpp @@ -148,7 +148,7 @@ inline void assign_ranges(InputProxy const& in_proxy, template class graham_andrew { - typedef InputPoint point_type; + using point_type = InputPoint; typedef typename std::vector container_type; class partitions diff --git a/include/boost/geometry/algorithms/detail/disjoint/box_box.hpp b/include/boost/geometry/algorithms/detail/disjoint/box_box.hpp index 02585b6f02..06ef052d81 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/box_box.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/box_box.hpp @@ -77,7 +77,7 @@ struct disjoint template static inline bool apply(Box1 const& box1, Box2 const& box2, Strategy const& strategy) { - typedef decltype(strategy.disjoint(box1, box2)) strategy_type; + using strategy_type = decltype(strategy.disjoint(box1, box2)); return strategy_type::apply(box1, box2); } }; diff --git a/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp b/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp index 8fa9f8a0c6..91b35207f8 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/multipoint_geometry.hpp @@ -220,8 +220,8 @@ class multipoint_linear class segment_range { public: - typedef geometry::segment_iterator const_iterator; - typedef const_iterator iterator; + using const_iterator = int; + using iterator = const_iterator; segment_range(Linear const& linear) : m_linear(linear) diff --git a/include/boost/geometry/algorithms/detail/disjoint/point_box.hpp b/include/boost/geometry/algorithms/detail/disjoint/point_box.hpp index 186f48febc..7c8f0a4945 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/point_box.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/point_box.hpp @@ -83,7 +83,7 @@ struct disjoint static inline bool apply(Point const& point, Box const& box, Strategy const& strategy) { - typedef decltype(strategy.covered_by(point, box)) strategy_type; + using strategy_type = decltype(strategy.covered_by(point, box)); // ! covered_by(point, box) return ! strategy_type::apply(point, box); } diff --git a/include/boost/geometry/algorithms/detail/disjoint/point_point.hpp b/include/boost/geometry/algorithms/detail/disjoint/point_point.hpp index af28ecaff5..6728ebbe78 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/point_point.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/point_point.hpp @@ -91,7 +91,7 @@ struct disjoint static inline bool apply(Point1 const& point1, Point2 const& point2, Strategy const& strategy) { - typedef decltype(strategy.relate(point1, point2)) strategy_type; + using strategy_type = decltype(strategy.relate(point1, point2)); // ! within(point1, point2) return ! strategy_type::apply(point1, point2); } diff --git a/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp b/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp index d959619c0b..7861cf45f3 100644 --- a/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp +++ b/include/boost/geometry/algorithms/detail/disjoint/segment_box.hpp @@ -131,7 +131,7 @@ struct disjoint_segment_box_sphere_or_spheroid // Case 2: disjoint if bounding boxes are disjoint - typedef typename coordinate_type::type CT; + using CT = int; segment_point_type p0_normalized; NormalizeStrategy::apply(p0, p0_normalized); diff --git a/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp b/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp index a012757170..b777528e84 100644 --- a/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp +++ b/include/boost/geometry/algorithms/detail/distance/geometry_to_segment_or_box.hpp @@ -153,19 +153,16 @@ class geometry_to_segment_or_box }; public: - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Geometry const& geometry, SegmentOrBox const& segment_or_box, Strategies const& strategies, bool check_intersection = true) { - typedef geometry::segment_iterator - < - Geometry const - > segment_iterator_type; + using segment_iterator_type = int; - typedef assign_new_min_iterator assign_new_value; + using assign_new_value = int; if (check_intersection diff --git a/include/boost/geometry/algorithms/detail/distance/interface.hpp b/include/boost/geometry/algorithms/detail/distance/interface.hpp index f903c5cee4..e4785aaf2f 100644 --- a/include/boost/geometry/algorithms/detail/distance/interface.hpp +++ b/include/boost/geometry/algorithms/detail/distance/interface.hpp @@ -106,7 +106,7 @@ struct distance template struct is_strategy_converter_specialized { - typedef strategies::distance::services::strategy_converter converter; + using converter = int; static const bool value = ! std::is_same < decltype(converter::get(std::declval())), @@ -126,8 +126,8 @@ struct distance Geometry2 const& geometry2, S const& strategy) { - typedef strategies::distance::services::strategy_converter converter; - typedef decltype(converter::get(strategy)) strategy_type; + using converter = int; + using strategy_type = int; return dispatch::distance < @@ -144,11 +144,8 @@ struct distance Geometry2 const& geometry2, S const& strategy) { - typedef strategies::distance::services::custom_strategy_converter - < - Geometry1, Geometry2, Strategy - > converter; - typedef decltype(converter::get(strategy)) strategy_type; + using converter = int; + using strategy_type = int; return dispatch::distance < diff --git a/include/boost/geometry/algorithms/detail/distance/iterator_selector.hpp b/include/boost/geometry/algorithms/detail/distance/iterator_selector.hpp index 363ec465a4..f48b420dd9 100644 --- a/include/boost/geometry/algorithms/detail/distance/iterator_selector.hpp +++ b/include/boost/geometry/algorithms/detail/distance/iterator_selector.hpp @@ -30,7 +30,7 @@ namespace detail { namespace distance template ::type> struct iterator_selector { - typedef geometry::segment_iterator iterator_type; + using iterator_type = int; static inline iterator_type begin(Geometry& geometry) { diff --git a/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp b/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp index dc1f4786b5..f78057fed4 100644 --- a/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp +++ b/include/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp @@ -31,7 +31,7 @@ namespace detail { namespace distance template struct linear_to_areal { - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Linear const& linear, Areal const& areal, @@ -60,7 +60,7 @@ struct linear_to_areal template struct areal_to_areal { - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Areal1 const& areal1, Areal2 const& areal2, diff --git a/include/boost/geometry/algorithms/detail/distance/linear_to_box.hpp b/include/boost/geometry/algorithms/detail/distance/linear_to_box.hpp index 1a2c9017e8..834930f519 100644 --- a/include/boost/geometry/algorithms/detail/distance/linear_to_box.hpp +++ b/include/boost/geometry/algorithms/detail/distance/linear_to_box.hpp @@ -32,7 +32,7 @@ namespace detail { namespace distance template struct linear_to_box { - typedef distance::return_t return_type; + using return_type = int; template static inline return_type apply(Box const& box, diff --git a/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp b/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp index 194ae76bc6..c932087a08 100644 --- a/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp +++ b/include/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp @@ -36,7 +36,7 @@ namespace detail { namespace distance template struct linear_to_linear { - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Linear1 const& linear1, Linear2 const& linear2, diff --git a/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp b/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp index 58a9d5b283..19bc854705 100644 --- a/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/distance/multipoint_to_geometry.hpp @@ -39,7 +39,7 @@ namespace detail { namespace distance template struct multipoint_to_multipoint { - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(MultiPoint1 const& multipoint1, MultiPoint2 const& multipoint2, @@ -119,7 +119,7 @@ class multipoint_to_areal }; public: - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(MultiPoint const& multipoint, Areal const& areal, diff --git a/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp b/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp index 08c8f70597..39b38d0b04 100644 --- a/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/distance/point_to_geometry.hpp @@ -166,15 +166,12 @@ template class point_to_range { private: - typedef distance::strategy_t strategy_type; + using strategy_type = int; - typedef detail::closest_feature::point_to_point_range - < - Point, Range, Closure - > point_to_point_range; + using point_to_point_range = int; public: - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Point const& point, Range const& range, Strategies const& strategies) @@ -219,7 +216,7 @@ template > struct point_to_ring { - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Point const& point, Ring const& ring, @@ -248,13 +245,10 @@ template class point_to_polygon { public: - typedef distance::return_t return_type; + using return_type = int; private: - typedef point_to_range - < - Point, typename ring_type::type, Closure, Strategies - > per_ring; + using per_ring = int; struct distance_to_interior_rings { @@ -375,7 +369,7 @@ class point_to_multigeometry template struct point_to_multigeometry { - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Point const& point, MultiPolygon const& multipolygon, diff --git a/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp b/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp index cd7c46ce71..a9ff0efdfa 100644 --- a/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp +++ b/include/boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp @@ -50,14 +50,14 @@ class point_or_segment_range_to_geometry_rtree PointOrSegmentIterator >::value_type point_or_segment_type; - typedef iterator_selector selector_type; + using selector_type = int; - typedef detail::closest_feature::range_to_range_rtree range_to_range; + using range_to_range = int; - typedef distance::strategy_t strategy_type; + using strategy_type = int; public: - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(PointOrSegmentIterator first, PointOrSegmentIterator last, diff --git a/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp b/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp index 70fefae32a..7bce53c863 100644 --- a/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp +++ b/include/boost/geometry/algorithms/detail/distance/segment_to_box.hpp @@ -95,7 +95,7 @@ class segment_to_box_2D_generic public: // TODO: Or should the return type be defined by sb_strategy_type? - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Segment const& segment, Box const& box, @@ -296,7 +296,7 @@ class segment_to_box_2D template struct compare_less_equal { - typedef compare_less_equal other; + using other = compare_less_equal; template inline bool operator()(T1 const& t1, T2 const& t2) const @@ -309,7 +309,7 @@ class segment_to_box_2D template struct compare_less_equal { - typedef compare_less_equal other; + using other = compare_less_equal; template inline bool operator()(T1 const& t1, T2 const& t2) const @@ -323,7 +323,7 @@ class segment_to_box_2D template struct other_compare { - typedef typename LessEqual::other type; + using type = typename LessEqual::other; }; @@ -344,7 +344,7 @@ class segment_to_box_2D // for negative slope segments swap the roles of bottom_right // and top_right and use greater_equal instead of less_equal. - typedef cast_to_result cast; + using cast = cast_to_result; LessEqual less_equal; @@ -403,7 +403,7 @@ class segment_to_box_2D { auto const ps_strategy = strategies.distance(dummy_point(), dummy_segment()); - typedef cast_to_result cast; + using cast = cast_to_result; LessEqual less_equal; // p0 is above the upper segment of the box (and inside its band) @@ -478,7 +478,7 @@ class segment_to_box_2D Strategies const& strategies, ReturnType& result) { - typedef compare_less_equal GreaterEqual; + using GreaterEqual = compare_less_equal; // the segment lies below the box if (geometry::get<1>(p1) < geometry::get<1>(bottom_left)) @@ -529,7 +529,7 @@ class segment_to_box_2D auto const side_strategy = strategies.side(); auto const ps_strategy = strategies.distance(dummy_point(), dummy_segment()); - typedef cast_to_result cast; + using cast = cast_to_result; ReturnType diff1 = cast::apply(geometry::get<1>(p1)) - cast::apply(geometry::get<1>(p0)); @@ -557,7 +557,7 @@ class segment_to_box_2D BoxPoint const& bottom_right, Strategies const& strategies) { - typedef compare_less_equal less_equal; + using less_equal = compare_less_equal; // assert that the segment has non-negative slope BOOST_GEOMETRY_ASSERT( ( math::equals(geometry::get<0>(p0), geometry::get<0>(p1)) @@ -611,7 +611,7 @@ class segment_to_box_2D BoxPoint const& bottom_right, Strategies const& strategies) { - typedef compare_less_equal greater_equal; + using greater_equal = compare_less_equal; // assert that the segment has negative slope BOOST_GEOMETRY_ASSERT( ( geometry::get<0>(p0) < geometry::get<0>(p1) @@ -722,10 +722,10 @@ template > class segment_to_box { - typedef distance::strategy_t strategy_type; + using strategy_type = int; public: - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Segment const& segment, Box const& box, @@ -756,7 +756,7 @@ class segment_to_box bottom_left, bottom_right, top_left, top_right); - typedef geometry::less less_type; + using less_type = int; if (less_type()(p[0], p[1])) { return segment_to_box_2D diff --git a/include/boost/geometry/algorithms/detail/distance/segment_to_segment.hpp b/include/boost/geometry/algorithms/detail/distance/segment_to_segment.hpp index 21933bdd6e..07e78a7259 100644 --- a/include/boost/geometry/algorithms/detail/distance/segment_to_segment.hpp +++ b/include/boost/geometry/algorithms/detail/distance/segment_to_segment.hpp @@ -46,10 +46,10 @@ namespace detail { namespace distance template class segment_to_segment { - typedef distance::strategy_t strategy_type; + using strategy_type = int; public: - typedef distance::return_t return_type; + using return_type = int; static inline return_type apply(Segment1 const& segment1, Segment2 const& segment2, Strategies const& strategies) diff --git a/include/boost/geometry/algorithms/detail/dummy_geometries.hpp b/include/boost/geometry/algorithms/detail/dummy_geometries.hpp index 722e6546a7..e300d7124c 100644 --- a/include/boost/geometry/algorithms/detail/dummy_geometries.hpp +++ b/include/boost/geometry/algorithms/detail/dummy_geometries.hpp @@ -39,7 +39,7 @@ struct dummy_multi_polygon {}; namespace traits { -template <> struct tag { typedef point_tag type; }; +template <> struct tag { using type = int; }; template <> struct tag { typedef segment_tag type; }; template <> struct tag { typedef box_tag type; }; template <> struct tag { typedef linestring_tag type; }; diff --git a/include/boost/geometry/algorithms/detail/envelope/initialize.hpp b/include/boost/geometry/algorithms/detail/envelope/initialize.hpp index 8d83426619..e05aa6bb72 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 = int; static inline void apply(Box& box, coordinate_type min_value diff --git a/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp b/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp index 05127e0d23..2497b6d175 100644 --- a/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/intersects_antimeridian.hpp @@ -34,10 +34,7 @@ struct intersects_antimeridian CoordinateType const& lon2, CoordinateType const& lat2) { - typedef math::detail::constants_on_spheroid - < - CoordinateType, Units - > constants; + using constants = int; return math::equals(math::abs(lat1), constants::max_latitude()) 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 2fa922705e..afd9c6272b 100644 --- a/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp +++ b/include/boost/geometry/algorithms/detail/envelope/range_of_boxes.hpp @@ -50,11 +50,11 @@ namespace detail { namespace envelope template class longitude_interval { - typedef T const& reference_type; + using reference_type = const T &; public: - typedef T value_type; - typedef T difference_type; + using value_type = T; + using difference_type = T; longitude_interval(T const& left, T const& right) { @@ -230,7 +230,7 @@ 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; + using coordinate_type = int; typedef typename detail::cs_angular_units::type units_type; static const bool is_equatorial = ! std::is_same @@ -239,13 +239,10 @@ struct envelope_range_of_boxes spherical_polar_tag >::value; - typedef math::detail::constants_on_spheroid - < - coordinate_type, units_type, is_equatorial - > constants; + using constants = int; - typedef longitude_interval interval_type; - typedef std::vector interval_range_type; + using interval_type = longitude_interval; + using interval_range_type = int; 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 952bf22154..83e2c4775e 100644 --- a/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp +++ b/include/boost/geometry/algorithms/detail/equals/collect_vectors.hpp @@ -50,7 +50,7 @@ namespace boost { namespace geometry template struct collected_vector_cartesian { - typedef T type; + using type = T; inline collected_vector_cartesian() {} @@ -143,9 +143,9 @@ struct collected_vector_cartesian template struct collected_vector_spherical { - typedef T type; + using type = T; - typedef model::point vector_type; + using vector_type = int; collected_vector_spherical() {} @@ -278,7 +278,7 @@ template struct range_collect_vectors { typedef typename boost::range_value::type item_type; - typedef typename item_type::type calculation_type; + using calculation_type = int; static inline void apply(Collection& collection, Range const& range) { @@ -340,7 +340,7 @@ struct box_collect_vectors // Calculate on coordinate type, but if it is integer, // then use double typedef typename boost::range_value::type item_type; - typedef typename item_type::type calculation_type; + using calculation_type = int; static inline void apply(Collection& collection, Box const& box) { @@ -397,7 +397,7 @@ struct polygon_collect_vectors { typedef typename geometry::ring_type::type ring_type; - typedef range_collect_vectors per_range; + using per_range = int; per_range::apply(collection, exterior_ring(polygon)); auto const& rings = interior_rings(polygon); diff --git a/include/boost/geometry/algorithms/detail/equals/implementation.hpp b/include/boost/geometry/algorithms/detail/equals/implementation.hpp index 2f803f3658..f1bebb845a 100644 --- a/include/boost/geometry/algorithms/detail/equals/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/equals/implementation.hpp @@ -69,7 +69,7 @@ struct point_point static inline bool apply(Point1 const& point1, Point2 const& point2, Strategy const& strategy) { - typedef decltype(strategy.relate(point1, point2)) strategy_type; + using strategy_type = decltype(strategy.relate(point1, point2)); return strategy_type::apply(point1, point2); } }; diff --git a/include/boost/geometry/algorithms/detail/expand/indexed.hpp b/include/boost/geometry/algorithms/detail/expand/indexed.hpp index 92d701d16e..3473a913d0 100644 --- a/include/boost/geometry/algorithms/detail/expand/indexed.hpp +++ b/include/boost/geometry/algorithms/detail/expand/indexed.hpp @@ -51,11 +51,7 @@ struct indexed_loop template static inline void apply(Box& box, Geometry const& source) { - typedef typename select_coordinate_type - < - Box, - Geometry - >::type coordinate_type; + using coordinate_type = int; coordinate_type const coord = get(source); diff --git a/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp b/include/boost/geometry/algorithms/detail/expand_by_epsilon.hpp index ae07f5bb0a..917ca2b2a5 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 = int; coord_type const coord = get(point); coord_type const seps = math::scaled_epsilon(coord); @@ -53,7 +53,7 @@ struct corner_by_epsilon static inline void apply(Point & point, typename coordinate_type::type const& eps) { - typedef typename coordinate_type::type coord_type; + using coord_type = int; coord_type const coord = get(point); coord_type const seps = math::scaled_epsilon(coord, eps); diff --git a/include/boost/geometry/algorithms/detail/interior_iterator.hpp b/include/boost/geometry/algorithms/detail/interior_iterator.hpp index 1a9d4f1922..c6381a8b7d 100644 --- a/include/boost/geometry/algorithms/detail/interior_iterator.hpp +++ b/include/boost/geometry/algorithms/detail/interior_iterator.hpp @@ -38,13 +38,13 @@ struct interior_iterator template struct copy_const { - typedef T type; + using type = T; }; template struct copy_const { - typedef T const type; + using type = const T; }; template diff --git a/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp b/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp index 3f5d43886a..22a5460db1 100644 --- a/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp +++ b/include/boost/geometry/algorithms/detail/intersection/areal_areal.hpp @@ -89,18 +89,9 @@ struct intersection_areal_areal_ > >(); - typedef geometry::detail::output_geometry_access - < - single_out, polygon_tag, polygon_tag - > areal; - typedef geometry::detail::output_geometry_access - < - single_out, linestring_tag, linestring_tag - > linear; - typedef geometry::detail::output_geometry_access - < - single_out, point_tag, point_tag - > pointlike; + using areal = int; + using linear = int; + using pointlike = int; // A * A -> A call_intersection(areal1, areal2, @@ -129,10 +120,7 @@ struct intersection_areal_areal_ areal::index, TupledOut >::type areal_out_type; - typedef geometry::detail::boundary_view - < - areal_out_type const - > areal_out_boundary_type; + using areal_out_boundary_type = int; areal_out_boundary_type areal_out_boundary(areal::get(geometry_out)); diff --git a/include/boost/geometry/algorithms/detail/intersects/implementation.hpp b/include/boost/geometry/algorithms/detail/intersects/implementation.hpp index 36f57fe6ab..903e3e548d 100644 --- a/include/boost/geometry/algorithms/detail/intersects/implementation.hpp +++ b/include/boost/geometry/algorithms/detail/intersects/implementation.hpp @@ -52,14 +52,11 @@ struct self_intersects Geometry, Geometry >::type strategy_type; - typedef detail::overlay::turn_info turn_info; + using turn_info = int; std::deque turns; - typedef detail::overlay::get_turn_info - < - detail::overlay::assign_null_policy - > turn_policy; + using turn_policy = int; strategy_type strategy; diff --git a/include/boost/geometry/algorithms/detail/is_simple/multipoint.hpp b/include/boost/geometry/algorithms/detail/is_simple/multipoint.hpp index 25d513f823..067db94208 100644 --- a/include/boost/geometry/algorithms/detail/is_simple/multipoint.hpp +++ b/include/boost/geometry/algorithms/detail/is_simple/multipoint.hpp @@ -45,12 +45,7 @@ struct is_simple_multipoint template static inline bool apply(MultiPoint const& multipoint, Strategy const& strategy) { - typedef geometry::less - < - point_type_t, - -1, - Strategy - > less_type; + using less_type = int; if (boost::empty(multipoint)) { diff --git a/include/boost/geometry/algorithms/detail/is_valid/complement_graph.hpp b/include/boost/geometry/algorithms/detail/is_valid/complement_graph.hpp index 9a51d30eb4..14bac49e08 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/complement_graph.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/complement_graph.hpp @@ -82,11 +82,11 @@ template class complement_graph { private: - typedef complement_graph_vertex vertex; - typedef std::set vertex_container; + using vertex = complement_graph_vertex; + using vertex_container = int; public: - typedef typename vertex_container::const_iterator vertex_handle; + using vertex_handle = int; private: struct vertex_handle_less @@ -97,7 +97,7 @@ class complement_graph } }; - typedef std::set neighbor_container; + using neighbor_container = int; class has_cycles_dfs_data { diff --git a/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp b/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp index 5bf5e7334d..c86d19c9cc 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/multipolygon.hpp @@ -183,10 +183,7 @@ class is_valid_multipolygon { has_multi_index index_predicate(multi_index); - typedef boost::filter_iterator - < - has_multi_index, TurnIterator - > filtered_turn_iterator; + using filtered_turn_iterator = int; filtered_turn_iterator filtered_turns_first(index_predicate, turns_first, diff --git a/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp b/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp index a02ce31932..05a0456bad 100644 --- a/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp +++ b/include/boost/geometry/algorithms/detail/is_valid/polygon.hpp @@ -122,8 +122,8 @@ class is_valid_polygon VisitPolicy& visitor, Strategy const& strategy) { - typedef debug_validity_phase debug_phase; - typedef typename ring_type::type ring_type; + using debug_phase = int; + using ring_type = int; // check validity of exterior ring debug_phase::apply(1); @@ -401,11 +401,7 @@ class is_valid_polygon < TurnIterator >::value_type turn_type; - typedef complement_graph - < - typename turn_type::point_type, - Strategy - > graph; + using graph = int; graph g(geometry::num_interior_rings(polygon) + 1); for (TurnIterator tit = first; tit != beyond; ++tit) diff --git a/include/boost/geometry/algorithms/detail/max_interval_gap.hpp b/include/boost/geometry/algorithms/detail/max_interval_gap.hpp index 905491ef36..528025cf5b 100644 --- a/include/boost/geometry/algorithms/detail/max_interval_gap.hpp +++ b/include/boost/geometry/algorithms/detail/max_interval_gap.hpp @@ -46,8 +46,8 @@ template class sweep_event { public: - typedef Interval interval_type; - typedef typename Interval::value_type time_type; + using interval_type = Interval; + using time_type = typename Interval::value_type; sweep_event(Interval const& interval, bool start_event = true) : m_interval(std::cref(interval)) @@ -116,8 +116,8 @@ struct initialization_visitor template class event_visitor { - typedef typename Event::time_type event_time_type; - typedef typename Event::interval_type::difference_type difference_type; + using event_time_type = typename Event::time_type; + using difference_type = typename Event::interval_type::difference_type; public: event_visitor() diff --git a/include/boost/geometry/algorithms/detail/overlaps/implementation.hpp b/include/boost/geometry/algorithms/detail/overlaps/implementation.hpp index 5ab1b6ba7b..c11f3c3dd5 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 = int; + using coordinate_type2 = int; coordinate_type1 const& min1 = get(b1); coordinate_type1 const& max1 = get(b1); diff --git a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp index 73e3bdb284..4c8edb556b 100644 --- a/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/assign_parents.hpp @@ -178,7 +178,7 @@ template > struct assign_visitor { - typedef typename RingMap::mapped_type ring_info_type; + using ring_info_type = typename RingMap::mapped_type; Geometry1 const& m_geometry1; Geometry2 const& m_geometry2; @@ -257,9 +257,9 @@ inline void assign_parents(Geometry1 const& geometry1, typedef typename geometry::tag::type tag1; typedef typename geometry::tag::type tag2; - typedef typename RingMap::mapped_type ring_info_type; - typedef typename ring_info_type::point_type point_type; - typedef model::box box_type; + using ring_info_type = typename RingMap::mapped_type; + using point_type = typename ring_info_type::point_type; + using box_type = int; typedef typename geometry::area_result < point_type, Strategy // TODO: point_type is technically incorrect diff --git a/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp b/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp index 2f8e6314ac..1c477a185b 100644 --- a/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/backtrack_check_si.hpp @@ -100,7 +100,7 @@ class backtrack_check_self_intersections {} }; public : - typedef state state_type; + using state_type = state; template < diff --git a/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp b/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp index e598dcfef1..9a3aff2804 100644 --- a/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/clip_linestring.hpp @@ -54,7 +54,7 @@ template class liang_barsky { private: - typedef model::referring_segment segment_type; + using segment_type = int; template inline bool check_edge(CoordinateType const& p, CoordinateType const& q, CalcType& t1, CalcType& t2) const @@ -90,7 +90,7 @@ class liang_barsky // TODO: Temporary, this strategy should be moved, it is cartesian-only - typedef strategy::within::cartesian_point_point equals_point_point_strategy_type; + using equals_point_point_strategy_type = int; static inline equals_point_point_strategy_type get_equals_point_point_strategy() { @@ -99,8 +99,8 @@ class liang_barsky 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 = int; + using calc_type = int; calc_type t1 = 0; calc_type t2 = 1; diff --git a/include/boost/geometry/algorithms/detail/overlay/follow.hpp b/include/boost/geometry/algorithms/detail/overlay/follow.hpp index 133f1c93ff..988ce28c15 100644 --- a/include/boost/geometry/algorithms/detail/overlay/follow.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/follow.hpp @@ -382,14 +382,8 @@ template > class follow { - typedef geometry::detail::output_geometry_access - < - GeometryOut, linestring_tag, linestring_tag - > linear; - typedef geometry::detail::output_geometry_access - < - GeometryOut, point_tag, linestring_tag - > pointlike; + using linear = int; + using pointlike = int; public : @@ -413,7 +407,7 @@ public : OutputIterator out, Strategy const& strategy) { - typedef following::action_selector action; + using action = following::action_selector; // Sort intersection points on segments-along-linestring, and distance // (like in enrich is done for poly/poly) diff --git a/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp b/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp index 1a6cd28000..a6f76514b2 100644 --- a/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/follow_linear_linear.hpp @@ -181,16 +181,10 @@ class follow_linestring_linear { protected: // allow spikes (false indicates: do not remove spikes) - typedef following::action_selector action; + using action = int; - typedef geometry::detail::output_geometry_access - < - GeometryOut, linestring_tag, linestring_tag - > linear; - typedef geometry::detail::output_geometry_access - < - GeometryOut, point_tag, linestring_tag - > pointlike; + using linear = int; + using pointlike = int; template < @@ -365,13 +359,9 @@ class follow_multilinestring_linear protected: typedef typename boost::range_value::type Linestring; - typedef follow_linestring_linear - < - LinestringOut, Linestring, Linear, - OverlayType, FollowIsolatedPoints, FollowContinueTurns - > Base; + using Base = int; - typedef following::action_selector action; + using action = int; typedef typename boost::range_iterator < @@ -439,10 +429,7 @@ class follow_multilinestring_linear { BOOST_GEOMETRY_ASSERT( first != beyond ); - typedef copy_linestrings_in_range - < - OutputIterator, OverlayType - > copy_linestrings; + using copy_linestrings = copy_linestrings_in_range; linestring_iterator ls_first = boost::begin(multilinestring); linestring_iterator ls_beyond = boost::end(multilinestring); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp index 9085387c1f..afd4620d3c 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_intersection_points.hpp @@ -55,12 +55,9 @@ struct get_turn_without_info Strategy const& strategy, OutputIterator out) { - typedef typename TurnInfo::point_type turn_point_type; + using turn_point_type = typename TurnInfo::point_type; - typedef policies::relate::segments_intersection_points - < - segment_intersection_points - > policy_type; + using policy_type = int; typename policy_type::return_type const result = strategy.relate().apply(range_p, range_q, policy_type()); 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 4dd823f96c..d58e4c40d1 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info.hpp @@ -1397,12 +1397,7 @@ struct get_turn_info UmbrellaStrategy const& umbrella_strategy, OutputIterator out) { - typedef intersection_info - < - UniqueSubRange1, UniqueSubRange2, - typename TurnInfo::point_type, - UmbrellaStrategy - > inters_info; + using inters_info = int; inters_info inters(range_p, range_q, umbrella_strategy); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp index 229277abe3..0f673f3b2a 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_for_endpoint.hpp @@ -231,7 +231,7 @@ class linear_intersections template struct get_turn_info_for_endpoint { - typedef std::pair operations_pair; + using operations_pair = int; BOOST_STATIC_ASSERT(EnableFirst || EnableLast); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp index 4ef747f019..8a32fa8684 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_helpers.hpp @@ -48,7 +48,7 @@ template > struct side_calculator { - typedef decltype(std::declval().side()) side_strategy_type; + using side_strategy_type = int; inline side_calculator(UniqueSubRange1 const& range_p, UniqueSubRange2 const& range_q, @@ -97,23 +97,14 @@ class intersection_info_base { public: - typedef segment_intersection_points intersection_point_type; - typedef policies::relate::segments_intersection_policy - < - intersection_point_type - > intersection_policy_type; + using intersection_point_type = int; + using intersection_policy_type = int; - typedef typename intersection_policy_type::return_type result_type; + using result_type = int; - typedef side_calculator - < - UniqueSubRange1, UniqueSubRange2, UmbrellaStrategy - > side_calculator_type; + using side_calculator_type = side_calculator; - typedef side_calculator - < - UniqueSubRange2, UniqueSubRange1, UmbrellaStrategy - > swapped_side_calculator_type; + using swapped_side_calculator_type = side_calculator; intersection_info_base(UniqueSubRange1 const& range_p, UniqueSubRange2 const& range_q, @@ -167,18 +158,17 @@ class intersection_info : public intersection_info_base { - typedef intersection_info_base base; + using base = intersection_info_base; public: - typedef typename UmbrellaStrategy::cs_tag cs_tag; + using cs_tag = typename UmbrellaStrategy::cs_tag; - typedef typename base::side_calculator_type side_calculator_type; - typedef typename base::result_type result_type; + using side_calculator_type = typename base::side_calculator_type; + using result_type = typename base::result_type; - typedef typename result_type::intersection_points_type i_info_type; - typedef typename result_type::direction_type d_info_type; + using i_info_type = typename result_type::intersection_points_type; + using d_info_type = typename result_type::direction_type; intersection_info(UniqueSubRange1 const& range_p, UniqueSubRange2 const& range_q, diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp index 95e6ed6698..99d83a82da 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_la.hpp @@ -54,12 +54,7 @@ struct get_turn_info_linear_areal UmbrellaStrategy const& umbrella_strategy, OutputIterator out) { - typedef intersection_info - < - UniqueSubRange1, UniqueSubRange2, - typename TurnInfo::point_type, - UmbrellaStrategy - > inters_info; + using inters_info = int; inters_info inters(range_p, range_q, umbrella_strategy); @@ -702,7 +697,7 @@ struct get_turn_info_linear_areal Strategy const& strategy) { namespace ov = overlay; - typedef ov::get_turn_info_for_endpoint get_info_e; + using get_info_e = int; std::size_t const ip_count = inters.i_info().count; // no intersection points diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp index 00349f29c0..8c1c7e5a74 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turn_info_ll.hpp @@ -49,12 +49,7 @@ struct get_turn_info_linear_linear UmbrellaStrategy const& umbrella_strategy, OutputIterator out) { - typedef intersection_info - < - UniqueSubRange1, UniqueSubRange2, - typename TurnInfo::point_type, - UmbrellaStrategy - > inters_info; + using inters_info = int; inters_info inters(range_p, range_q, umbrella_strategy); diff --git a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp index b8cb1ea015..dac2277441 100644 --- a/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/get_turns.hpp @@ -497,13 +497,13 @@ class get_turns_generic { // First create monotonic sections... typedef typename boost::range_value::type ip_type; - typedef typename ip_type::point_type point_type; + using point_type = int; - typedef model::box box_type; - typedef geometry::sections sections_type; + using box_type = int; + using sections_type = int; sections_type sec1, sec2; - typedef std::integer_sequence dimensions; + using dimensions = int; geometry::sectionalize(geometry1, sec1, strategy, 0); @@ -542,7 +542,7 @@ 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 box_array = int; using view_type = detail::closed_clockwise_view < @@ -555,7 +555,7 @@ struct get_turns_cs struct unique_sub_range_from_box_policy { - typedef box_point_type point_type; + using point_type = int; unique_sub_range_from_box_policy(box_array const& box) : m_box(box) @@ -584,7 +584,7 @@ struct get_turns_cs struct unique_sub_range_from_view_policy { - typedef range_point_type point_type; + using point_type = int; unique_sub_range_from_view_policy(view_type const& view, point_type const& pi, point_type const& pj, iterator_type it) : m_view(view) @@ -742,12 +742,7 @@ struct get_turns_polygon_cs { typedef typename geometry::ring_type::type ring_type; - typedef detail::get_turns::get_turns_cs - < - ring_type, Box, - Reverse, ReverseBox, - TurnPolicy - > intersector_type; + using intersector_type = int; intersector_type::apply( source_id1, geometry::exterior_ring(polygon), @@ -1009,7 +1004,7 @@ inline void get_turns(Geometry1 const& geometry1, { concepts::check_concepts_and_equal_dimensions(); - typedef detail::overlay::get_turn_info TurnPolicy; + using TurnPolicy = int; //typedef detail::get_turns::get_turn_info_type TurnPolicy; std::conditional_t diff --git a/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp b/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp index fa5f52c593..8e5a2111c0 100644 --- a/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/handle_colocations.hpp @@ -432,8 +432,8 @@ inline void gather_cluster_properties(Clusters& clusters, Turns& turns, Strategy const& strategy) { typedef typename boost::range_value::type turn_type; - typedef typename turn_type::point_type point_type; - typedef typename turn_type::turn_operation_type turn_operation_type; + using point_type = int; + using turn_operation_type = int; // Define sorter, sorting counter-clockwise such that polygons are on the // right side diff --git a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp index 1dbd717ae5..daed6752d3 100644 --- a/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/intersection_insert.hpp @@ -117,7 +117,7 @@ struct intersection_linestring_linestring_point OutputIterator out, Strategy const& strategy) { - typedef detail::overlay::turn_info turn_info; + using turn_info = int; std::deque turns; geometry::get_intersection_points(linestring1, linestring2, @@ -269,15 +269,7 @@ struct intersection_of_linestring_with_areal return out; } - typedef detail::overlay::follow - < - GeometryOut, - LineString, - Areal, - OverlayType, - false, // do not remove spikes for linear geometries - FollowIsolatedPoints - > follower; + using follower = int; typedef typename geometry::detail::output_geometry_access < @@ -286,10 +278,7 @@ struct intersection_of_linestring_with_areal using point_type = point_type_t; - typedef geometry::segment_ratio - < - typename coordinate_type::type - > ratio_type; + using ratio_type = int; typedef detail::overlay::turn_info < @@ -306,10 +295,7 @@ struct intersection_of_linestring_with_areal detail::get_turns::no_interrupt_policy policy; - typedef detail::overlay::get_turn_info_linear_areal - < - detail::overlay::assign_null_policy - > turn_policy; + using turn_policy = int; dispatch::get_turns < @@ -387,11 +373,7 @@ struct intersection_areal_areal_point OutputIterator out, Strategy const& strategy) { - typedef detail::overlay::turn_info - < - PointOut, - typename segment_ratio_type::type - > turn_info; + using turn_info = int; std::vector turns; detail::get_turns::no_interrupt_policy policy; @@ -419,7 +401,7 @@ struct intersection_linear_areal_point OutputIterator out, Strategy const& strategy) { - typedef geometry::segment_ratio::type> ratio_type; + using type = int> ratio_type; typedef detail::overlay::turn_info < @@ -432,10 +414,7 @@ struct intersection_linear_areal_point > > turn_info; - typedef detail::overlay::get_turn_info_linear_areal - < - detail::overlay::assign_null_policy - > turn_policy; + using turn_policy = int; 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 140c6aaf06..a0775961b4 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 @@ -39,7 +39,7 @@ namespace detail { namespace overlay template struct indexed_turn_operation { - typedef TurnOperation type; + using type = TurnOperation; std::size_t turn_index; std::size_t operation_index; diff --git a/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp b/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp index 75ff474322..8c10335e1e 100644 --- a/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/linear_linear.hpp @@ -239,7 +239,7 @@ class linear_linear_linestring > >::template turn_info_type::type turn_info; - typedef std::vector turns_container; + using turns_container = int; turns_container turns; compute_turns(turns, linear1, linear2, strategy); diff --git a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp index 1d950306ac..b3c0376ff1 100644 --- a/include/boost/geometry/algorithms/detail/overlay/overlay.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/overlay.hpp @@ -178,7 +178,7 @@ inline OutputIterator return_if_one_input_is_empty(Geometry1 const& geometry1, OutputIterator out, Strategy const& strategy) { typedef typename geometry::ring_type::type ring_type; - typedef std::deque ring_container_type; + using ring_container_type = int; typedef ring_properties < @@ -249,22 +249,15 @@ struct overlay } typedef typename geometry::point_type::type point_type; - typedef detail::overlay::traversal_turn_info - < - point_type, - typename segment_ratio_type::type + using type = int > turn_info; - typedef std::deque turn_container_type; + using turn_container_type = int; typedef typename geometry::ring_type::type ring_type; - typedef std::deque ring_container_type; + using ring_container_type = int; // Define the clusters, mapping cluster_id -> turns - typedef std::map - < - signed_size_type, - cluster_info - > cluster_type; + using cluster_type = int; 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 5cfbae09be..42b06d273a 100644 --- a/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_areal.hpp @@ -183,14 +183,12 @@ class multipoint_multipolygon_point { item_visitor_type item_visitor(multipolygon, oit, strategy); - typedef geometry::model::point - < - typename geometry::coordinate_type::type, + using type = int, geometry::dimension::value, typename geometry::coordinate_system::type > point_type; - typedef geometry::model::box box_type; - typedef std::pair box_pair; + using box_type = int; + using box_pair = int; std::vector box_pairs; box_pairs.reserve(boost::size(multipolygon)); @@ -217,9 +215,7 @@ class multipoint_multipolygon_point OutputIterator oit, Strategy const& strategy) { - typedef std::vector - < - typename boost::range_value::type + using type = int > point_vector_type; point_vector_type common_points; diff --git a/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp b/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp index bfb4880a11..e6098ac011 100644 --- a/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_linear.hpp @@ -217,8 +217,8 @@ class multipoint_linear_point class segment_range { public: - typedef geometry::segment_iterator const_iterator; - typedef const_iterator iterator; + using const_iterator = int; + using iterator = const_iterator; explicit segment_range(Linear const& linear) : m_linear(linear) @@ -273,9 +273,7 @@ class multipoint_linear_point OutputIterator oit, Strategy const& strategy) { - typedef std::vector - < - typename boost::range_value::type + using type = int > point_vector_type; point_vector_type common_points; diff --git a/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp b/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp index 1745bcf433..ebeb19f7a5 100644 --- a/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/pointlike_pointlike.hpp @@ -221,7 +221,7 @@ struct point_multipoint_point OutputIterator oit, Strategy const& strategy) { - typedef action_selector_pl action; + using action = action_selector_pl; for (auto it = boost::begin(multipoint); it != boost::end(multipoint); ++it) { @@ -255,7 +255,7 @@ struct multipoint_multipoint_point OutputIterator oit, Strategy const& strategy) { - typedef geometry::less less_type; + using less_type = int; if BOOST_GEOMETRY_CONSTEXPR (OverlayType != overlay_difference) { 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 4fd69411d0..2b8f92c699 100644 --- a/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/range_in_geometry.hpp @@ -56,7 +56,7 @@ template struct points_range { typedef typename geometry::point_type::type point_type; - typedef const point_type * iterator_type; + using iterator_type = const int *; explicit points_range(Box const& box) { @@ -113,7 +113,7 @@ static inline int range_in_geometry(Geometry1 const& geometry1, { int result = 0; points_range points(geometry1); - typedef typename points_range::iterator_type iterator_type; + using iterator_type = typename points_range::iterator_type; iterator_type const end = points.end(); iterator_type it = points.begin(); if (it == end) diff --git a/include/boost/geometry/algorithms/detail/overlay/ring_properties.hpp b/include/boost/geometry/algorithms/detail/overlay/ring_properties.hpp index 4039891f74..f3f09e3ed2 100644 --- a/include/boost/geometry/algorithms/detail/overlay/ring_properties.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/ring_properties.hpp @@ -30,8 +30,8 @@ namespace detail { namespace overlay template struct ring_properties { - typedef Point point_type; - typedef AreaType area_type; + using point_type = Point; + using area_type = AreaType; bool valid; 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 49c4357c22..6474c27dff 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 type = int> box_type; // sectionalize in two dimensions to detect // all potential spikes correctly - typedef geometry::sections sections_type; + using sections_type = int; - typedef std::integer_sequence dimensions; + using dimensions = int; sections_type sec; geometry::sectionalize(geometry, diff --git a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp index e306688827..d2c1a87a4f 100644 --- a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp @@ -94,14 +94,10 @@ private : 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 turn_operation_type = int; typedef typename geometry::point_type::type point_type; - typedef sort_by_side::side_sorter - < - Reverse1, Reverse2, OverlayType, - point_type, Strategy, side_compare_type - > sbs_type; + using sbs_type = int; public : inline traversal(Geometry1 const& geometry1, Geometry2 const& geometry2, diff --git a/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp b/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp index 89d44b5b29..6a9f7b603a 100644 --- a/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/traversal_ring_creator.hpp @@ -51,16 +51,10 @@ template > struct traversal_ring_creator { - typedef traversal - < - Reverse1, Reverse2, OverlayType, - Geometry1, Geometry2, Turns, Clusters, - Strategy, - Visitor - > traversal_type; + using traversal_type = int; typedef typename boost::range_value::type turn_type; - typedef typename turn_type::turn_operation_type turn_operation_type; + using turn_operation_type = int; static const operation_type target_operation = operation_from_overlay::value; diff --git a/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp b/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp index 8f1d22c8c0..d0652dd762 100644 --- a/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/turn_info.hpp @@ -51,13 +51,13 @@ enum method_type template struct turn_operation { - typedef SegmentRatio segment_ratio_type; + using segment_ratio_type = SegmentRatio; operation_type operation; segment_identifier seg_id; SegmentRatio fraction; - typedef typename coordinate_type::type comparable_distance_type; + using comparable_distance_type = int; comparable_distance_type remaining_distance; inline turn_operation() @@ -85,10 +85,10 @@ template > struct turn_info { - typedef Point point_type; - typedef SegmentRatio segment_ratio_type; - typedef Operation turn_operation_type; - typedef Container container_type; + using point_type = Point; + using segment_ratio_type = SegmentRatio; + using turn_operation_type = Operation; + using container_type = Container; Point point; method_type method; diff --git a/include/boost/geometry/algorithms/detail/point_is_spike_or_equal.hpp b/include/boost/geometry/algorithms/detail/point_is_spike_or_equal.hpp index 2b86d3c6bf..0958fe51d8 100644 --- a/include/boost/geometry/algorithms/detail/point_is_spike_or_equal.hpp +++ b/include/boost/geometry/algorithms/detail/point_is_spike_or_equal.hpp @@ -53,7 +53,7 @@ inline bool point_is_spike_or_equal(Point1 const& last_point, // prev | back Point3 const& segment_b, // curr | back - 1 | spike's vertex SideStrategy const& strategy) { - typedef typename SideStrategy::cs_tag cs_tag; + using cs_tag = typename SideStrategy::cs_tag; int const side = strategy.apply(segment_a, segment_b, last_point); if (side == 0) diff --git a/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp b/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp index 3a2b307858..f78e5c59df 100644 --- a/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/areal_areal.hpp @@ -415,7 +415,7 @@ struct areal_areal template class turns_analyser { - typedef typename TurnInfo::point_type turn_point_type; + using turn_point_type = typename TurnInfo::point_type; static const std::size_t op_id = OpId; static const std::size_t other_op_id = (OpId + 1) % 2; diff --git a/include/boost/geometry/algorithms/detail/relate/de9im.hpp b/include/boost/geometry/algorithms/detail/relate/de9im.hpp index a9d6ea5792..45015c528f 100644 --- a/include/boost/geometry/algorithms/detail/relate/de9im.hpp +++ b/include/boost/geometry/algorithms/detail/relate/de9im.hpp @@ -94,7 +94,7 @@ class matrix class mask : public detail::relate::mask<3, 3> { - typedef detail::relate::mask<3, 3> base_type; + using base_type = int; public: /*! @@ -239,7 +239,7 @@ namespace detail { namespace de9im template struct static_mask_equals_type { - typedef geometry::de9im::static_mask<'T', '*', 'F', '*', '*', 'F', 'F', 'F', '*'> type; // wikipedia + using type = geometry::de9im::static_mask<'T', '*', 'F', '*', '*', 'F', 'F', 'F', '*'>; // wikipedia //typedef geometry::de9im::static_mask<'T', 'F', 'F', 'F', 'T', 'F', 'F', 'F', 'T'> type; // OGC }; @@ -247,7 +247,7 @@ struct static_mask_equals_type template struct static_mask_disjoint_type { - typedef geometry::de9im::static_mask<'F', 'F', '*', 'F', 'F', '*', '*', '*', '*'> type; + using type = geometry::de9im::static_mask<'F', 'F', '*', 'F', 'F', '*', '*', '*', '*'>; }; // TOUCHES - NOT P/P @@ -272,7 +272,7 @@ struct static_mask_touches_impl template struct static_mask_touches_impl { - typedef geometry::detail::relate::false_mask type; + using type = int; }; template @@ -289,20 +289,14 @@ struct static_mask_touches_type template struct static_mask_within_type { - typedef geometry::de9im::static_mask<'T', '*', 'F', '*', '*', 'F', '*', '*', '*'> type; + using type = geometry::de9im::static_mask<'T', '*', 'F', '*', '*', 'F', '*', '*', '*'>; }; // COVERED_BY (non OGC) template struct static_mask_covered_by_type { - typedef util::type_sequence - < - geometry::de9im::static_mask<'T', '*', 'F', '*', '*', 'F', '*', '*', '*'>, - geometry::de9im::static_mask<'*', 'T', 'F', '*', '*', 'F', '*', '*', '*'>, - geometry::de9im::static_mask<'*', '*', 'F', 'T', '*', 'F', '*', '*', '*'>, - geometry::de9im::static_mask<'*', '*', 'F', '*', 'T', 'F', '*', '*', '*'> - > type; + using type = int; }; // CROSSES @@ -327,7 +321,7 @@ template > struct static_mask_crosses_impl { - typedef geometry::de9im::static_mask<'T', '*', '*', '*', '*', '*', 'T', '*', '*'> type; + using type = geometry::de9im::static_mask<'T', '*', '*', '*', '*', '*', 'T', '*', '*'>; }; // dim(G1) == dim(G2) - P/P A/A template @@ -383,7 +377,7 @@ struct static_mask_overlaps_impl template struct static_mask_overlaps_impl { - typedef geometry::de9im::static_mask<'T', '*', 'T', '*', '*', '*', 'T', '*', '*'> type; + using type = geometry::de9im::static_mask<'T', '*', 'T', '*', '*', '*', 'T', '*', '*'>; }; // dim(G1) == 1 && dim(G2) == 1 - L/L template diff --git a/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp b/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp index 7bea322748..ef8ffbdc68 100644 --- a/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp +++ b/include/boost/geometry/algorithms/detail/relate/follow_helpers.hpp @@ -236,8 +236,8 @@ class exit_watcher static std::size_t const op_id = OpId; static std::size_t const other_op_id = (OpId + 1) % 2; - typedef typename TurnInfo::point_type point_type; - typedef detail::relate::point_info point_info; + using point_type = typename TurnInfo::point_type; + using point_info = detail::relate::point_info; public: exit_watcher() diff --git a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp index 1dfea74903..bddaf8a479 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_areal.hpp @@ -657,7 +657,7 @@ struct linear_areal // For the same IP and multi_index - the same other's single geometry // set priorities as the least operation found for the whole single geometry // so e.g. single geometries containing 'u' will always be before those only containing 'i' - typedef turns::op_to_int<0,2,3,1,4,0> op_to_int_xuic; + using op_to_int_xuic = int; for_each_equal_range(first, last, set_turns_group_priority(), // least operation in xuic order same_ip_and_multi_index()); // other's multi_index @@ -744,7 +744,7 @@ struct linear_areal template class turns_analyser { - typedef typename TurnInfo::point_type turn_point_type; + using turn_point_type = typename TurnInfo::point_type; static const std::size_t op_id = 0; static const std::size_t other_op_id = 1; @@ -1462,7 +1462,7 @@ struct linear_areal template struct areal_linear { - typedef linear_areal linear_areal_type; + using linear_areal_type = linear_areal; static const bool interruption_enabled = linear_areal_type::interruption_enabled; diff --git a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp index 8a326265af..6b3b54cbe9 100644 --- a/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp +++ b/include/boost/geometry/algorithms/detail/relate/linear_linear.hpp @@ -257,7 +257,7 @@ struct linear_linear template class turns_analyser { - typedef typename TurnInfo::point_type turn_point_type; + using turn_point_type = typename TurnInfo::point_type; static const std::size_t op_id = OpId; static const std::size_t other_op_id = (OpId + 1) % 2; diff --git a/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp b/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp index 8d6fe39a56..d2f8c66a15 100644 --- a/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/relate/multi_point_geometry.hpp @@ -226,7 +226,7 @@ struct multi_point_single_geometry } } - typedef detail::relate::topology_check tc_t; + using tc_t = int; if ( relate::may_update(result) || relate::may_update(result) ) @@ -337,7 +337,7 @@ class multi_point_multi_geometry_ii_ib template class item_visitor_type { - typedef detail::relate::topology_check topology_check_type; + using topology_check_type = int; public: item_visitor_type(MultiGeometry const& multi_geometry, @@ -538,7 +538,7 @@ struct multi_point_multi_geometry boxes[i].second = i; } - typedef detail::relate::topology_check tc_t; + using tc_t = int; tc_t tc(multi_geometry, strategy); if ( relate::may_update(result) diff --git a/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp b/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp index e570a7209b..16c00e6752 100644 --- a/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/relate/point_geometry.hpp @@ -57,7 +57,7 @@ struct point_geometry if ( BOOST_GEOMETRY_CONDITION(result.interrupt) ) return; - typedef detail::relate::topology_check tc_t; + using tc_t = int; if ( relate::may_update(result) || relate::may_update(result) ) diff --git a/include/boost/geometry/algorithms/detail/relate/point_point.hpp b/include/boost/geometry/algorithms/detail/relate/point_point.hpp index 1348c0dc63..ec58f7c84d 100644 --- a/include/boost/geometry/algorithms/detail/relate/point_point.hpp +++ b/include/boost/geometry/algorithms/detail/relate/point_point.hpp @@ -225,7 +225,7 @@ struct multipoint_multipoint { // sort points from the 1 MPt typedef typename geometry::point_type::type point_type; - typedef geometry::less less_type; + using less_type = int; std::vector points(boost::begin(sorted_mpt), boost::end(sorted_mpt)); diff --git a/include/boost/geometry/algorithms/detail/relate/result.hpp b/include/boost/geometry/algorithms/detail/relate/result.hpp index de982c37a8..eaf131bc2e 100644 --- a/include/boost/geometry/algorithms/detail/relate/result.hpp +++ b/include/boost/geometry/algorithms/detail/relate/result.hpp @@ -58,10 +58,10 @@ template class matrix { public: - typedef char value_type; - typedef std::size_t size_type; - typedef const char * const_iterator; - typedef const_iterator iterator; + using value_type = char; + using size_type = int; + using const_iterator = const char *; + using iterator = const_iterator; static const std::size_t static_width = Width; static const std::size_t static_height = Height; @@ -137,7 +137,7 @@ template class matrix_handler { public: - typedef Matrix result_type; + using result_type = Matrix; static const bool interrupt = false; @@ -549,13 +549,10 @@ class mask_handler relate::matrix::value> > { - typedef matrix_handler - < - relate::matrix::value> - > base_t; + using base_t = int; public: - typedef bool result_type; + using result_type = bool; bool interrupt; @@ -1041,10 +1038,10 @@ template class static_mask_handler : private matrix_handler< matrix<3> > { - typedef matrix_handler< relate::matrix<3> > base_type; + using base_type = int; public: - typedef bool result_type; + using result_type = bool; bool interrupt; diff --git a/include/boost/geometry/algorithms/detail/relate/turns.hpp b/include/boost/geometry/algorithms/detail/relate/turns.hpp index 48661261a4..f07bd95b87 100644 --- a/include/boost/geometry/algorithms/detail/relate/turns.hpp +++ b/include/boost/geometry/algorithms/detail/relate/turns.hpp @@ -157,7 +157,7 @@ struct less_op_linear_areal_single segment_identifier const& left_other_seg_id = left.operations[other_op_id].seg_id; segment_identifier const& right_other_seg_id = right.operations[other_op_id].seg_id; - typedef typename Turn::turn_operation_type operation_type; + using operation_type = typename Turn::turn_operation_type; operation_type const& left_operation = left.operations[OpId]; operation_type const& right_operation = right.operations[OpId]; @@ -192,7 +192,7 @@ struct less_op_areal_areal segment_identifier const& left_other_seg_id = left.operations[other_op_id].seg_id; segment_identifier const& right_other_seg_id = right.operations[other_op_id].seg_id; - typedef typename Turn::turn_operation_type operation_type; + using operation_type = typename Turn::turn_operation_type; operation_type const& left_operation = left.operations[OpId]; operation_type const& right_operation = right.operations[OpId]; diff --git a/include/boost/geometry/algorithms/detail/relation/interface.hpp b/include/boost/geometry/algorithms/detail/relation/interface.hpp index 4c3616ab42..07148e20be 100644 --- a/include/boost/geometry/algorithms/detail/relation/interface.hpp +++ b/include/boost/geometry/algorithms/detail/relation/interface.hpp @@ -28,7 +28,7 @@ namespace detail { namespace relate template struct result_handler_type { - typedef matrix_handler type; + using type = int; }; diff --git a/include/boost/geometry/algorithms/detail/signed_size_type.hpp b/include/boost/geometry/algorithms/detail/signed_size_type.hpp index 43fa2abe5e..1014a34f3e 100644 --- a/include/boost/geometry/algorithms/detail/signed_size_type.hpp +++ b/include/boost/geometry/algorithms/detail/signed_size_type.hpp @@ -20,7 +20,7 @@ namespace boost { namespace geometry { -typedef std::make_signed::type signed_size_type; +using type = int signed_size_type; }} // namespace boost::geometry diff --git a/include/boost/geometry/algorithms/detail/single_geometry.hpp b/include/boost/geometry/algorithms/detail/single_geometry.hpp index 054771feb5..46ad3bf410 100644 --- a/include/boost/geometry/algorithms/detail/single_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/single_geometry.hpp @@ -64,7 +64,7 @@ namespace detail { template struct single_geometry_return_type { - typedef typename detail_dispatch::single_geometry::return_type type; + using type = typename detail_dispatch::single_geometry::return_type; }; template diff --git a/include/boost/geometry/algorithms/detail/sub_range.hpp b/include/boost/geometry/algorithms/detail/sub_range.hpp index c1ae9fefb1..18ddbf64d8 100644 --- a/include/boost/geometry/algorithms/detail/sub_range.hpp +++ b/include/boost/geometry/algorithms/detail/sub_range.hpp @@ -46,7 +46,7 @@ struct sub_range : not_implemented template struct sub_range { - typedef Geometry & return_type; + using return_type = Geometry &; template static inline return_type apply(Geometry & geometry, Id const&) @@ -113,7 +113,7 @@ namespace detail { template struct sub_range_return_type { - typedef typename detail_dispatch::sub_range::return_type type; + using type = int; }; // This function also works for geometry::segment_identifier diff --git a/include/boost/geometry/algorithms/detail/sweep.hpp b/include/boost/geometry/algorithms/detail/sweep.hpp index a8c7f9a91a..d13beb017c 100644 --- a/include/boost/geometry/algorithms/detail/sweep.hpp +++ b/include/boost/geometry/algorithms/detail/sweep.hpp @@ -51,7 +51,7 @@ inline void sweep(Range const& range, PriorityQueue& queue, EventVisitor& event_visitor, InterruptPolicy const& interrupt_policy) { - typedef typename PriorityQueue::value_type event_type; + using event_type = typename PriorityQueue::value_type; initialization_visitor.apply(range, queue, event_visitor); while (! queue.empty()) diff --git a/include/boost/geometry/algorithms/detail/touches/implementation.hpp b/include/boost/geometry/algorithms/detail/touches/implementation.hpp index 515f827dd0..fae1acbf89 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 = int; + using coordinate_type2 = int; coordinate_type1 const& min1 = get(b1); coordinate_type1 const& max1 = get(b1); @@ -510,12 +510,9 @@ struct self_touches Geometry, Geometry >::type strategy_type; typedef typename geometry::point_type::type point_type; - typedef detail::overlay::turn_info turn_info; + using turn_info = int; - typedef detail::overlay::get_turn_info - < - detail::overlay::assign_null_policy - > policy_type; + using policy_type = int; std::deque turns; detail::touches::areal_interrupt_policy policy; diff --git a/include/boost/geometry/algorithms/detail/tupled_output.hpp b/include/boost/geometry/algorithms/detail/tupled_output.hpp index d13793e737..de1a2ba275 100644 --- a/include/boost/geometry/algorithms/detail/tupled_output.hpp +++ b/include/boost/geometry/algorithms/detail/tupled_output.hpp @@ -209,7 +209,7 @@ struct tupled_range_values_bt template struct tupled_range_values_bt { - typedef boost::tuples::null_type type; + using type = int; }; template @@ -292,7 +292,7 @@ struct tupled_back_inserters_bt template struct tupled_back_inserters_bt { - typedef boost::tuples::null_type type; + using type = int; static type apply(Tuple const&) { @@ -333,7 +333,7 @@ template > struct output_geometry_back_inserter_ { - typedef geometry::range::back_insert_iterator type; + using type = int; static type apply(GeometryOut & out) { diff --git a/include/boost/geometry/algorithms/detail/within/multi_point.hpp b/include/boost/geometry/algorithms/detail/within/multi_point.hpp index 8ba07e0917..613da4ece8 100644 --- a/include/boost/geometry/algorithms/detail/within/multi_point.hpp +++ b/include/boost/geometry/algorithms/detail/within/multi_point.hpp @@ -81,7 +81,7 @@ struct multi_point_multi_point Strategy const& /*strategy*/) { typedef typename boost::range_value::type point2_type; - typedef geometry::less less_type; + using less_type = int; less_type const less = less_type(); @@ -133,7 +133,7 @@ struct multi_point_single_geometry for (auto it = boost::begin(multi_point); it != boost::end(multi_point); ++it ) { - typedef decltype(strategy.covered_by(*it, box)) point_in_box_type; + using point_in_box_type = decltype(strategy.covered_by(*(), ())); int in_val = 0; @@ -206,7 +206,7 @@ struct multi_point_multi_geometry bool found_boundary = false; int boundaries = 0; - typedef typename box_pair_vector::const_iterator box_iterator; + using box_iterator = int; for (box_iterator box_it = inters_boxes.begin() ; box_it != inters_boxes.end() ; ++box_it ) { 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 459e54ec85..2e6a15337a 100644 --- a/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp +++ b/include/boost/geometry/algorithms/detail/within/point_in_geometry.hpp @@ -83,7 +83,7 @@ struct point_in_geometry template static inline int apply(Point1 const& point1, Point2 const& point2, Strategy const& strategy) { - typedef decltype(strategy.relate(point1, point2)) strategy_type; + using strategy_type = decltype(strategy.relate(point1, point2)); return strategy_type::apply(point1, point2) ? 1 : -1; } }; diff --git a/include/boost/geometry/algorithms/difference.hpp b/include/boost/geometry/algorithms/difference.hpp index 2d18b31421..15037c1595 100644 --- a/include/boost/geometry/algorithms/difference.hpp +++ b/include/boost/geometry/algorithms/difference.hpp @@ -113,10 +113,7 @@ struct call_intersection_insert_tupled_base tag_cast_t, pointlike_tag, linear_tag, areal_tag> >; - typedef detail::expect_output - < - Geometry1, Geometry2, SingleOut, single_tag - > expect_check; + using expect_check = int; typedef typename geometry::detail::output_geometry_access < diff --git a/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp b/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp index 88c5bb3a05..3c84c6ad0f 100644 --- a/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp +++ b/include/boost/geometry/algorithms/discrete_hausdorff_distance.hpp @@ -62,12 +62,7 @@ struct point_range static inline auto apply(Point const& pnt, Range const& range, Strategies const& strategies) { - typedef typename distance_result - < - Point, - point_type_t, - Strategies - >::type result_type; + using result_type = int; typedef typename boost::range_size::type size_type; diff --git a/include/boost/geometry/algorithms/dispatch/distance.hpp b/include/boost/geometry/algorithms/dispatch/distance.hpp index 9272fd496b..3b19a53b6f 100644 --- a/include/boost/geometry/algorithms/dispatch/distance.hpp +++ b/include/boost/geometry/algorithms/dispatch/distance.hpp @@ -59,7 +59,7 @@ struct distance_strategy_type template struct distance_strategy_type { - typedef Strategy type; + using type = Strategy; }; template diff --git a/include/boost/geometry/algorithms/for_each.hpp b/include/boost/geometry/algorithms/for_each.hpp index a1fd0a6cc2..90efcf2bcc 100644 --- a/include/boost/geometry/algorithms/for_each.hpp +++ b/include/boost/geometry/algorithms/for_each.hpp @@ -104,21 +104,14 @@ struct fe_segment_segment template struct fe_range_value { - typedef util::transcribe_const_t - < - Range, - typename boost::range_value::type + using type = int > type; }; template struct fe_point_type { - typedef util::transcribe_const_t - < - Range, - point_type_t - > type; + using type = int; }; @@ -147,7 +140,7 @@ struct fe_point_call_f { // Implementation for real references (both const and mutable) // and const proxy references. - typedef typename fe_point_type::type point_type; + using point_type = typename fe_point_type::type; point_type& p = *it; return f(p); } @@ -161,7 +154,7 @@ struct fe_point_call_f { // Implementation for proxy mutable references. // Temporary point has to be created and assigned afterwards. - typedef typename fe_point_type::type point_type; + using point_type = typename fe_point_type::type; point_type p = *it; bool result = f(p); *it = p; @@ -204,7 +197,7 @@ struct fe_segment_call_f // If const proxy references are returned by iterators // then const real references here prevents temporary // objects from being destroyed. - typedef typename fe_point_type::type point_type; + using point_type = typename fe_point_type::type; point_type& p0 = *it0; point_type& p1 = *it1; model::referring_segment s(p0, p1); @@ -220,7 +213,7 @@ struct fe_segment_call_f { // Mutable proxy references returned by iterators. // Temporary points have to be created and assigned afterwards. - typedef typename fe_point_type::type point_type; + using point_type = typename fe_point_type::type; point_type p0 = *it0; point_type p1 = *it1; model::referring_segment s(p0, p1); diff --git a/include/boost/geometry/algorithms/length.hpp b/include/boost/geometry/algorithms/length.hpp index a79e78dd74..71566bce65 100644 --- a/include/boost/geometry/algorithms/length.hpp +++ b/include/boost/geometry/algorithms/length.hpp @@ -80,7 +80,7 @@ struct segment_length template struct range_length { - typedef typename default_length_result::type return_type; + using return_type = int; template static inline return_type @@ -119,7 +119,7 @@ namespace dispatch template ::type> struct length : detail::calculate_null { - typedef typename default_length_result::type return_type; + using return_type = int; template static inline return_type apply(Geometry const& geometry, Strategy const& strategy) diff --git a/include/boost/geometry/algorithms/line_interpolate.hpp b/include/boost/geometry/algorithms/line_interpolate.hpp index 9afbe5092c..9775130fd0 100644 --- a/include/boost/geometry/algorithms/line_interpolate.hpp +++ b/include/boost/geometry/algorithms/line_interpolate.hpp @@ -111,8 +111,7 @@ struct interpolate_range auto const pp_strategy = strategies.distance(dummy_point(), dummy_point()); auto const strategy = strategies.line_interpolate(range); - typedef decltype(pp_strategy.apply( - std::declval(), std::declval())) distance_type; + using distance_type = int; auto prev = it++; distance_type repeated_distance = max_distance; diff --git a/include/boost/geometry/algorithms/perimeter.hpp b/include/boost/geometry/algorithms/perimeter.hpp index 3b7f7e693c..47541fa1d3 100644 --- a/include/boost/geometry/algorithms/perimeter.hpp +++ b/include/boost/geometry/algorithms/perimeter.hpp @@ -54,7 +54,7 @@ namespace dispatch template ::type> struct perimeter : detail::calculate_null { - typedef typename default_length_result::type return_type; + using return_type = int; template static inline return_type apply(Geometry const& geometry, Strategy const& strategy) diff --git a/include/boost/geometry/algorithms/remove_spikes.hpp b/include/boost/geometry/algorithms/remove_spikes.hpp index 48880a5033..ac62ef0c06 100644 --- a/include/boost/geometry/algorithms/remove_spikes.hpp +++ b/include/boost/geometry/algorithms/remove_spikes.hpp @@ -166,7 +166,7 @@ struct polygon_remove_spikes template static inline void apply(Polygon& polygon, SideStrategy const& strategy) { - typedef range_remove_spikes per_range; + using per_range = range_remove_spikes; per_range::apply(exterior_ring(polygon), strategy); auto&& rings = interior_rings(polygon); diff --git a/include/boost/geometry/algorithms/simplify.hpp b/include/boost/geometry/algorithms/simplify.hpp index 28a3a5582c..4f73201274 100644 --- a/include/boost/geometry/algorithms/simplify.hpp +++ b/include/boost/geometry/algorithms/simplify.hpp @@ -84,7 +84,7 @@ namespace detail { namespace simplify template struct douglas_peucker_point { - typedef Point point_type; + using point_type = Point; Point const* p; bool included; @@ -120,8 +120,7 @@ class douglas_peucker PSDistanceStrategy const& ps_distance_strategy) { typedef typename std::iterator_traits::value_type::point_type point_type; - typedef decltype(ps_distance_strategy.apply(std::declval(), - std::declval(), std::declval())) distance_type; + using distance_type = int; std::size_t size = end - begin; @@ -204,7 +203,7 @@ class douglas_peucker #endif typedef typename boost::range_value::type point_type; - typedef douglas_peucker_point dp_point_type; + using dp_point_type = int; // Copy coordinates, a vector of references to all points std::vector ref_candidates(boost::begin(range), @@ -244,7 +243,7 @@ class douglas_peucker Strategies const& strategies) { typedef typename boost::range_value::type point_type; - typedef decltype(strategies.distance(detail::dummy_point(), detail::dummy_segment())) distance_strategy_type; + using distance_strategy_type = int; typedef typename strategy::distance::services::comparable_type < diff --git a/include/boost/geometry/algorithms/sym_difference.hpp b/include/boost/geometry/algorithms/sym_difference.hpp index b550750064..bcd0be18f5 100644 --- a/include/boost/geometry/algorithms/sym_difference.hpp +++ b/include/boost/geometry/algorithms/sym_difference.hpp @@ -113,10 +113,7 @@ struct sym_difference_areal_areal OutputIterator out, Strategy const& strategy) { - typedef geometry::model::multi_polygon - < - GeometryOut - > helper_geometry_type; + using helper_geometry_type = int; helper_geometry_type diff12, diff21; diff --git a/include/boost/geometry/algorithms/unique.hpp b/include/boost/geometry/algorithms/unique.hpp index 618087e14e..0d02a02695 100644 --- a/include/boost/geometry/algorithms/unique.hpp +++ b/include/boost/geometry/algorithms/unique.hpp @@ -167,9 +167,7 @@ inline void unique(Geometry& geometry) concepts::check(); // Default strategy is the default point-comparison policy - typedef geometry::equal_to - < - typename geometry::point_type::type + using type = int > policy; diff --git a/include/boost/geometry/arithmetic/dot_product.hpp b/include/boost/geometry/arithmetic/dot_product.hpp index 2d7643666b..c587c1af65 100644 --- a/include/boost/geometry/arithmetic/dot_product.hpp +++ b/include/boost/geometry/arithmetic/dot_product.hpp @@ -36,7 +36,7 @@ namespace detail template struct dot_product_maker { - typedef typename select_coordinate_type::type coordinate_type; + using coordinate_type = int; static constexpr coordinate_type apply(P1 const& p1, P2 const& p2) { @@ -48,7 +48,7 @@ struct dot_product_maker template struct dot_product_maker { - typedef typename select_coordinate_type::type coordinate_type; + using coordinate_type = int; static constexpr coordinate_type apply(P1 const& p1, P2 const& p2) { diff --git a/include/boost/geometry/arithmetic/normalize.hpp b/include/boost/geometry/arithmetic/normalize.hpp index 64e08c2dce..71de92c871 100644 --- a/include/boost/geometry/arithmetic/normalize.hpp +++ b/include/boost/geometry/arithmetic/normalize.hpp @@ -41,7 +41,7 @@ inline typename coordinate_type::type vec_length(Point const& pt) template inline bool vec_normalize(Point & pt, typename coordinate_type::type & len) { - typedef typename coordinate_type::type coord_t; + using coord_t = int; 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 = int; 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 efbcdff7d2..1c77b78eaa 100644 --- a/include/boost/geometry/core/coordinate_promotion.hpp +++ b/include/boost/geometry/core/coordinate_promotion.hpp @@ -37,10 +37,8 @@ namespace traits template struct promote_floating_point { - typedef std::conditional_t - < - std::is_integral::value, - PromoteIntegerTo, + using value = int; +using PromoteIntegerTo = int, T > type; }; @@ -49,10 +47,7 @@ struct promote_floating_point template struct fp_coordinate_type { - typedef typename promote_floating_point - < - typename coordinate_type::type - >::type type; + using type = int; }; namespace detail diff --git a/include/boost/geometry/core/coordinate_system.hpp b/include/boost/geometry/core/coordinate_system.hpp index cebdbc2e64..311c04843e 100644 --- a/include/boost/geometry/core/coordinate_system.hpp +++ b/include/boost/geometry/core/coordinate_system.hpp @@ -58,10 +58,10 @@ namespace core_dispatch template struct coordinate_system { - typedef typename point_type::type P; + using P = int; // Call its own specialization on point-tag - typedef typename coordinate_system::type type; + using type = int; }; diff --git a/include/boost/geometry/core/cs.hpp b/include/boost/geometry/core/cs.hpp index e6bc4e34f0..8301ec67c0 100644 --- a/include/boost/geometry/core/cs.hpp +++ b/include/boost/geometry/core/cs.hpp @@ -66,13 +66,13 @@ struct define_angular_units template <> struct define_angular_units { - typedef geometry::degree units; + using units = geometry::degree; }; template <> struct define_angular_units { - typedef geometry::radian units; + using units = geometry::radian; }; } // namespace core_detail @@ -194,33 +194,33 @@ struct cs_tag template struct cs_tag > { - typedef geographic_tag type; + using type = int; }; template struct cs_tag > { - typedef spherical_polar_tag type; + using type = int; }; template struct cs_tag > { - typedef spherical_equatorial_tag type; + using type = int; }; template<> struct cs_tag { - typedef cartesian_tag type; + using type = int; }; template <> struct cs_tag { - typedef cs_undefined_tag type; + using type = int; }; #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS @@ -255,7 +255,7 @@ namespace traits template struct cs_angular_units { - typedef geometry::radian type; + using type = geometry::radian; }; #ifndef DOXYGEN_NO_TRAITS_SPECIALIZATIONS @@ -263,19 +263,19 @@ struct cs_angular_units template struct cs_angular_units > { - typedef DegreeOrRadian type; + using type = DegreeOrRadian; }; template struct cs_angular_units > { - typedef DegreeOrRadian type; + using type = DegreeOrRadian; }; template struct cs_angular_units > { - typedef DegreeOrRadian type; + using type = DegreeOrRadian; }; #endif // DOXYGEN_NO_TRAITS_SPECIALIZATIONS diff --git a/include/boost/geometry/core/interior_type.hpp b/include/boost/geometry/core/interior_type.hpp index d7879d2921..507a233ab0 100644 --- a/include/boost/geometry/core/interior_type.hpp +++ b/include/boost/geometry/core/interior_type.hpp @@ -132,21 +132,13 @@ struct interior_type template struct interior_type { - typedef typename core_dispatch::interior_type - < - typename tag::type, - Geometry - >::type type; + using type = int; }; template struct interior_return_type { - typedef typename core_dispatch::interior_return_type - < - typename tag::type, - Geometry - >::type type; + using type = int; }; diff --git a/include/boost/geometry/core/radian_access.hpp b/include/boost/geometry/core/radian_access.hpp index ef87701ba5..d81b179ee0 100644 --- a/include/boost/geometry/core/radian_access.hpp +++ b/include/boost/geometry/core/radian_access.hpp @@ -43,7 +43,7 @@ namespace detail template struct degree_radian_converter { - typedef typename fp_coordinate_type::type coordinate_type; + using coordinate_type = int; static inline coordinate_type get(Geometry const& geometry) { @@ -69,7 +69,7 @@ struct degree_radian_converter template struct radian_access { - typedef typename fp_coordinate_type::type coordinate_type; + using coordinate_type = int; static inline coordinate_type get(Geometry const& geometry) { @@ -108,7 +108,7 @@ struct radian_access<1, Geometry, CoordinateSystem > template struct degree_radian_converter_box_segment { - typedef typename fp_coordinate_type::type coordinate_type; + using coordinate_type = int; static inline coordinate_type get(Geometry const& geometry) { @@ -134,7 +134,7 @@ struct degree_radian_converter_box_segment template struct radian_access_box_segment { - typedef typename fp_coordinate_type::type coordinate_type; + using coordinate_type = int; static inline coordinate_type get(Geometry const& geometry) { diff --git a/include/boost/geometry/core/tag.hpp b/include/boost/geometry/core/tag.hpp index 196741562c..e9f82c3f9c 100644 --- a/include/boost/geometry/core/tag.hpp +++ b/include/boost/geometry/core/tag.hpp @@ -44,7 +44,7 @@ namespace traits template struct tag { - typedef void type; + using type = void; }; } // namespace traits diff --git a/include/boost/geometry/core/tags.hpp b/include/boost/geometry/core/tags.hpp index f0d62783b8..88422e4e07 100644 --- a/include/boost/geometry/core/tags.hpp +++ b/include/boost/geometry/core/tags.hpp @@ -135,19 +135,19 @@ struct single_tag_of template <> struct single_tag_of { - typedef point_tag type; + using type = point_tag; }; template <> struct single_tag_of { - typedef linestring_tag type; + using type = linestring_tag; }; template <> struct single_tag_of { - typedef polygon_tag type; + using type = polygon_tag; }; #endif diff --git a/include/boost/geometry/extensions/algebra/algorithms/assign.hpp b/include/boost/geometry/extensions/algebra/algorithms/assign.hpp index d30ec466e4..3bfb8a6f2f 100644 --- a/include/boost/geometry/extensions/algebra/algorithms/assign.hpp +++ b/include/boost/geometry/extensions/algebra/algorithms/assign.hpp @@ -98,7 +98,7 @@ namespace dispatch { template struct assign { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; template static inline void apply(V& v, T const& c1, T const& c2) diff --git a/include/boost/geometry/extensions/algebra/algorithms/convert.hpp b/include/boost/geometry/extensions/algebra/algorithms/convert.hpp index 593c050282..2f19fdc37a 100644 --- a/include/boost/geometry/extensions/algebra/algorithms/convert.hpp +++ b/include/boost/geometry/extensions/algebra/algorithms/convert.hpp @@ -35,7 +35,7 @@ struct convert::type T; + using T = int; // quaternion should be normalized diff --git a/include/boost/geometry/extensions/algebra/geometries/concepts/matrix_concept.hpp b/include/boost/geometry/extensions/algebra/geometries/concepts/matrix_concept.hpp index fd9520aa0a..b4ed6c4afd 100644 --- a/include/boost/geometry/extensions/algebra/geometries/concepts/matrix_concept.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/concepts/matrix_concept.hpp @@ -38,8 +38,8 @@ class Matrix { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; enum { ccount = dimension::value }; diff --git a/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp b/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp index 2370e65f1f..7d0bd6b445 100644 --- a/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_matrix_concept.hpp @@ -38,8 +38,8 @@ class RotationMatrix { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; enum { ccount = dimension::value }; @@ -97,8 +97,8 @@ class ConstRotationMatrix { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; enum { ccount = dimension::value }; diff --git a/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp b/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp index fbd4ffc407..6e1f7d8fb8 100644 --- a/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/concepts/rotation_quaternion_concept.hpp @@ -38,8 +38,8 @@ class RotationQuaternion { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; template struct dimension_checker @@ -84,8 +84,8 @@ class ConstRotationQuaternion { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; template struct dimension_checker diff --git a/include/boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp b/include/boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp index a3f50a6466..567cd2656d 100644 --- a/include/boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/concepts/vector_concept.hpp @@ -38,8 +38,8 @@ class Vector { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; enum { ccount = dimension::value }; @@ -83,8 +83,8 @@ class ConstVector { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; enum { ccount = dimension::value }; diff --git a/include/boost/geometry/extensions/algebra/geometries/matrix.hpp b/include/boost/geometry/extensions/algebra/geometries/matrix.hpp index 0b90d9ed75..b10e8a91c4 100644 --- a/include/boost/geometry/extensions/algebra/geometries/matrix.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/matrix.hpp @@ -80,13 +80,13 @@ namespace traits template struct tag > { - typedef matrix_tag type; + using type = int; }; template struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; //template @@ -108,7 +108,7 @@ struct indexed_dimension, 1> template struct indexed_access, I, J> { - typedef CoordinateType coordinate_type; + using coordinate_type = CoordinateType; static inline coordinate_type get(model::matrix const& m) { diff --git a/include/boost/geometry/extensions/algebra/geometries/quaternion.hpp b/include/boost/geometry/extensions/algebra/geometries/quaternion.hpp index 843bb18d32..39afd166d5 100644 --- a/include/boost/geometry/extensions/algebra/geometries/quaternion.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/quaternion.hpp @@ -90,13 +90,13 @@ namespace traits template struct tag > { - typedef quaternion_tag type; + using type = int; }; template struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; //template diff --git a/include/boost/geometry/extensions/algebra/geometries/rotation_matrix.hpp b/include/boost/geometry/extensions/algebra/geometries/rotation_matrix.hpp index bb4f75b511..2520de830f 100644 --- a/include/boost/geometry/extensions/algebra/geometries/rotation_matrix.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/rotation_matrix.hpp @@ -81,19 +81,19 @@ namespace traits template struct tag > { - typedef rotation_matrix_tag type; + using type = int; }; template struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; template struct coordinate_system > { - typedef cs::cartesian type; + using type = int; }; template @@ -104,7 +104,7 @@ struct dimension > template struct indexed_access, I, J> { - typedef CoordinateType coordinate_type; + using coordinate_type = CoordinateType; static inline coordinate_type get(model::rotation_matrix const& m) { diff --git a/include/boost/geometry/extensions/algebra/geometries/rotation_quaternion.hpp b/include/boost/geometry/extensions/algebra/geometries/rotation_quaternion.hpp index 9e3b6274ba..290facc713 100644 --- a/include/boost/geometry/extensions/algebra/geometries/rotation_quaternion.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/rotation_quaternion.hpp @@ -93,19 +93,19 @@ namespace traits template struct tag > { - typedef rotation_quaternion_tag type; + using type = int; }; template struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; template struct coordinate_system > { - typedef cs::cartesian type; + using type = int; }; template diff --git a/include/boost/geometry/extensions/algebra/geometries/vector.hpp b/include/boost/geometry/extensions/algebra/geometries/vector.hpp index 72e604b944..05a014fed4 100644 --- a/include/boost/geometry/extensions/algebra/geometries/vector.hpp +++ b/include/boost/geometry/extensions/algebra/geometries/vector.hpp @@ -88,19 +88,19 @@ namespace traits template struct tag > { - typedef vector_tag type; + using type = int; }; template struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; template struct coordinate_system > { - typedef cs::cartesian type; + using type = int; }; template diff --git a/include/boost/geometry/extensions/algorithms/connect.hpp b/include/boost/geometry/extensions/algorithms/connect.hpp index 1b1387f42c..900c53ec6e 100644 --- a/include/boost/geometry/extensions/algorithms/connect.hpp +++ b/include/boost/geometry/extensions/algorithms/connect.hpp @@ -83,11 +83,11 @@ struct map_policy geometry::less > map_type; - typedef typename map_type::const_iterator map_iterator_type; + using map_iterator_type = int; typedef typename std::vector >::const_iterator vector_iterator_type; - typedef Point point_type; - typedef typename default_distance_result::type distance_result_type; + using point_type = Point; + using distance_result_type = int; map_type map; @@ -208,11 +208,11 @@ struct fuzzy_policy > > map_type; - typedef typename map_type::const_iterator map_iterator_type; + using map_iterator_type = int; typedef typename std::vector >::const_iterator vector_iterator_type; - typedef Point point_type; - typedef typename default_distance_result::type distance_result_type; + using point_type = Point; + using distance_result_type = int; map_type map; @@ -400,7 +400,7 @@ inline void debug(Policy const& policy) template struct connect_multi_linestring { - typedef typename point_type::type point_type; + using point_type = int; typedef typename boost::range_iterator::type iterator_type; typedef typename boost::range_value::type linestring_type; @@ -544,10 +544,7 @@ inline void connect(Geometry const& geometry, Collection& output_collection) concepts::check(); concepts::check(); - typedef detail::connect::map_policy - < - typename point_type::type - > policy_type; + using policy_type = int; policy_type policy; @@ -576,10 +573,7 @@ inline void connect(Geometry const& geometry, Collection& output_collection, concepts::check(); concepts::check(); - typedef detail::connect::fuzzy_policy - < - typename point_type::type - > policy_type; + using policy_type = int; policy_type policy(limit); diff --git a/include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp b/include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp index c27c844235..eb17067e2f 100644 --- a/include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp +++ b/include/boost/geometry/extensions/algorithms/detail/overlay/dissolver.hpp @@ -134,10 +134,7 @@ class plusmin_policy typedef typename geometry::point_type::type point_type; - typedef overlay::turn_info - < - point_type, - typename segment_ratio_type::type + using type = int > turn_info; std::deque turns; @@ -311,7 +308,7 @@ struct dissolver_generic { typedef typename boost::range_value::type value_type; typedef typename geometry::point_type::type point_type; - typedef model::box box_type; + using box_type = int; for (auto it = boost::begin(v); it != boost::end(v); ++it, ++index) { @@ -541,9 +538,9 @@ struct dissolver_generic typedef typename boost::range_value::type output_type; typedef typename geometry::point_type::type point_type; - typedef model::box box_type; - typedef dissolve_helper dissolve_helper_type; - typedef std::vector helper_vector_type; + using box_type = int; + using dissolve_helper_type = dissolve_helper; + using helper_vector_type = int; // Vector with indices to both input_range (source 0) and output_collection (source 1) helper_vector_type helper_vector; diff --git a/include/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp b/include/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp index 0bf704f5e7..6557c3e8d8 100644 --- a/include/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp +++ b/include/boost/geometry/extensions/algorithms/detail/overlay/split_rings.hpp @@ -240,7 +240,7 @@ struct split_turn_operation : public detail::overlay::turn_operation , distance(geometry::return_distance_result(0)) {} - typedef typename default_distance_result::type distance_type; + using distance_type = int; distance_type distance; // distance-measurement from segment.first to IP }; @@ -285,13 +285,7 @@ class range_split_rings typedef typename geometry::ring_type::type ring_type; - typedef typename intersection_strategies - < - typename cs_tag::type, - point_type, - point_type, - point_type - >::segment_intersection_strategy_type strategy; + using strategy = int; @@ -350,9 +344,9 @@ class range_split_rings static void call(Range range, RingCollection& ring_collection) { - typedef split_turn_info turn_info; + using turn_info = int; - typedef std::deque turns_type; + using turns_type = int; turns_type turns; detail::get_turns::no_interrupt_policy policy; @@ -483,11 +477,7 @@ public : template struct polygon_split_rings { - typedef range_split_rings - < - typename ring_type::type, - RingCollection - > per_ring; + using per_ring = int; static inline void apply(Polygon const& polygon, RingCollection& ring_collection) { diff --git a/include/boost/geometry/extensions/algorithms/dissolve.hpp b/include/boost/geometry/extensions/algorithms/dissolve.hpp index 958cf7c251..47e1d1c653 100644 --- a/include/boost/geometry/extensions/algorithms/dissolve.hpp +++ b/include/boost/geometry/extensions/algorithms/dissolve.hpp @@ -79,7 +79,7 @@ template class backtrack_for_dissolve { public : - typedef detail::overlay::backtrack_state state_type; + using state_type = int; template < @@ -126,7 +126,7 @@ struct dissolve_ring static void adapt_turns(Turns& turns) { typedef typename boost::range_value::type turn_type; - typedef typename turn_type::turn_operation_type turn_operation_type; + using turn_operation_type = int; for (typename Turns::iterator it = turns.begin(); it != turns.end(); ++it) @@ -274,7 +274,7 @@ struct dissolve_ring template struct dissolve_polygon { - typedef typename ring_type::type ring_type; + using ring_type = int; template < diff --git a/include/boost/geometry/extensions/algorithms/midpoints.hpp b/include/boost/geometry/extensions/algorithms/midpoints.hpp index 0c0db54383..ab27904c8c 100644 --- a/include/boost/geometry/extensions/algorithms/midpoints.hpp +++ b/include/boost/geometry/extensions/algorithms/midpoints.hpp @@ -59,7 +59,7 @@ struct range_midpoints static inline void apply(Range const& range, bool start_and_end, Iterator out) { - typedef typename point_type::type point_type; + using point_type = int; typedef typename boost::range_iterator::type iterator_type; iterator_type it = boost::begin(range); diff --git a/include/boost/geometry/extensions/algorithms/offset.hpp b/include/boost/geometry/extensions/algorithms/offset.hpp index 1ee7a840e4..70289d9f67 100644 --- a/include/boost/geometry/extensions/algorithms/offset.hpp +++ b/include/boost/geometry/extensions/algorithms/offset.hpp @@ -47,10 +47,7 @@ template > struct offset_range { - typedef geometry::detail::buffer::buffer_range - < - Range - > per_range; + using per_range = int; template < @@ -70,7 +67,7 @@ struct offset_range bool reverse) { collection.start_new_ring(); - typedef typename point_type::type output_point_type; + using output_point_type = int; output_point_type first_p1, first_p2, last_p1, last_p2; if (reverse) diff --git a/include/boost/geometry/extensions/algorithms/offset_appender.hpp b/include/boost/geometry/extensions/algorithms/offset_appender.hpp index fc3f2dfb5e..b78835979c 100644 --- a/include/boost/geometry/extensions/algorithms/offset_appender.hpp +++ b/include/boost/geometry/extensions/algorithms/offset_appender.hpp @@ -35,7 +35,7 @@ template > struct offset_appender { - typedef Range range_type; + using range_type = Range; typedef typename geometry::point_type::type point_type; diff --git a/include/boost/geometry/extensions/algorithms/remove_marked.hpp b/include/boost/geometry/extensions/algorithms/remove_marked.hpp index 205af05ae1..38ddc44e61 100644 --- a/include/boost/geometry/extensions/algorithms/remove_marked.hpp +++ b/include/boost/geometry/extensions/algorithms/remove_marked.hpp @@ -54,7 +54,7 @@ struct range_remove_marked typename cs_tag::type >::type side_strategy_type; - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; static inline void apply(Range const& range_in, ring_identifier id, @@ -66,7 +66,7 @@ struct range_remove_marked range_out = range_in; return; } - typedef typename MarkMap::mapped_type bit_vector_type; + using bit_vector_type = typename MarkMap::mapped_type; if (boost::size(range_in) != boost::size(mit->second)) { @@ -98,7 +98,7 @@ struct polygon_remove_marked { typedef typename geometry::ring_type::type ring_type; - typedef range_remove_marked per_range; + using per_range = int; id.ring_index = -1; per_range::apply(exterior_ring(polygon_in), id, exterior_ring(polygon_out), mark_map); diff --git a/include/boost/geometry/extensions/algorithms/selected.hpp b/include/boost/geometry/extensions/algorithms/selected.hpp index 97db0bda60..186b16ca08 100644 --- a/include/boost/geometry/extensions/algorithms/selected.hpp +++ b/include/boost/geometry/extensions/algorithms/selected.hpp @@ -57,7 +57,7 @@ struct differences_loop { static inline bool apply(P1 const& p1, P2 const& p2, T const& distance, T& sum) { - typedef typename select_coordinate_type::type coordinate_type; + using coordinate_type = int; coordinate_type const c1 = boost::numeric_cast(get(p1)); coordinate_type const c2 = boost::numeric_cast(get(p2)); @@ -88,7 +88,7 @@ struct outside_loop { static inline bool apply(PS const& seg1, PS const& seg2, P const& point, T const& distance) { - typedef typename select_coordinate_type::type coordinate_type; + using coordinate_type = int; coordinate_type const v = boost::numeric_cast(get(point)); coordinate_type const s1 = get(seg1); @@ -178,7 +178,7 @@ struct close_to_range return false; } - typedef typename point_type::type point_type; + using point_type = int; typedef typename boost::range_iterator::type iterator_type; iterator_type it = boost::begin(range); diff --git a/include/boost/geometry/extensions/astronomy/core/cs.hpp b/include/boost/geometry/extensions/astronomy/core/cs.hpp index c5833a326c..9f0e3576ce 100644 --- a/include/boost/geometry/extensions/astronomy/core/cs.hpp +++ b/include/boost/geometry/extensions/astronomy/core/cs.hpp @@ -39,7 +39,7 @@ namespace celestial template struct ecliptic { - typedef DegreeOrRadian units; + using units = DegreeOrRadian; }; diff --git a/include/boost/geometry/extensions/gis/geographic/core/cs.hpp b/include/boost/geometry/extensions/gis/geographic/core/cs.hpp index 0d42969804..7cf26eef5f 100644 --- a/include/boost/geometry/extensions/gis/geographic/core/cs.hpp +++ b/include/boost/geometry/extensions/gis/geographic/core/cs.hpp @@ -67,7 +67,7 @@ namespace traits template<> struct cs_tag { - typedef cartesian_tag type; + using type = int; }; template diff --git a/include/boost/geometry/extensions/gis/geographic/strategies/area_huiller_earth.hpp b/include/boost/geometry/extensions/gis/geographic/strategies/area_huiller_earth.hpp index 8116279f4a..dd80219e56 100644 --- a/include/boost/geometry/extensions/gis/geographic/strategies/area_huiller_earth.hpp +++ b/include/boost/geometry/extensions/gis/geographic/strategies/area_huiller_earth.hpp @@ -46,7 +46,7 @@ namespace services template struct default_strategy { - typedef huiller_earth type; + using type = int; }; } // namespace services diff --git a/include/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp b/include/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp index 44b1d3f428..47b3b87402 100644 --- a/include/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp +++ b/include/boost/geometry/extensions/gis/io/shapelib/shp_read_object.hpp @@ -88,7 +88,7 @@ struct read_polygon double* const x = shape.padfX; double* const y = shape.padfY; - typedef std::pair ring_plus_area; + using ring_plus_area = int; std::vector rings; rings.resize(shape.nParts); diff --git a/include/boost/geometry/extensions/gis/io/veshape/write_veshape.hpp b/include/boost/geometry/extensions/gis/io/veshape/write_veshape.hpp index daabd9e3cb..fb5d8da34d 100644 --- a/include/boost/geometry/extensions/gis/io/veshape/write_veshape.hpp +++ b/include/boost/geometry/extensions/gis/io/veshape/write_veshape.hpp @@ -167,7 +167,7 @@ struct veshape_poly template static inline void stream(std::basic_ostream& os, P const& poly) { - typedef typename ring_type

::type ring; + using ring = int; veshape_range::stream(os, exterior_ring(poly)); diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/endian.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/endian.hpp index b02d9b1c15..d15530f489 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/endian.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/endian.hpp @@ -196,8 +196,8 @@ void store_dispatch(Iterator& bytes, T value, E1, E2) template struct endian_value_base { - typedef T value_type; - typedef native_endian_tag endian_type; + using value_type = T; + using endian_type = int; endian_value_base() : value(T()) {} explicit endian_value_base(T value) : value(value) {} @@ -214,7 +214,7 @@ struct endian_value_base template struct endian_value : public endian_value_base { - typedef endian_value_base base; + using base = endian_value_base; endian_value() {} explicit endian_value(T value) : base(value) {} @@ -235,7 +235,7 @@ struct endian_value : public endian_value_base template <> struct endian_value : public endian_value_base { - typedef endian_value_base base; + using base = endian_value_base; endian_value() {} explicit endian_value(double value) : base(value) {} diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp index a8e0e70adc..331b7174d4 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/parser.hpp @@ -62,7 +62,7 @@ namespace detail { namespace wkb template struct value_parser { - typedef T value_type; + using value_type = T; template static bool parse(Iterator& it, Iterator end, T& value, byte_order_type::enum_t order) @@ -79,7 +79,7 @@ struct value_parser diff_type const required_size = sizeof(T); if (it != end && std::distance(it, end) >= required_size) { - typedef endian::endian_value parsed_value_type; + using parsed_value_type = int; parsed_value_type parsed_value; // Decide on direcion of endianness translation, detault to native @@ -150,7 +150,7 @@ struct parsing_assigner static void run(Iterator& it, Iterator end, P& point, byte_order_type::enum_t order) { - typedef typename coordinate_type

::type coordinate_type; + using coordinate_type = int; // coordinate type in WKB is always double double value(0); @@ -208,7 +208,7 @@ struct point_container_parser static bool parse(Iterator& it, Iterator end, C& container, byte_order_type::enum_t order) { - typedef typename point_type::type point_type; + using point_type = int; boost::uint32_t num_points(0); if (!value_parser::parse(it, end, num_points, order)) diff --git a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp index 8345796b2a..cf25f868d3 100644 --- a/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp +++ b/include/boost/geometry/extensions/gis/io/wkb/detail/writer.hpp @@ -44,7 +44,7 @@ namespace detail { namespace wkb template struct value_writer { - typedef T value_type; + using value_type = T; template static bool write(T const& value, diff --git a/include/boost/geometry/extensions/gis/latlong/point_ll.hpp b/include/boost/geometry/extensions/gis/latlong/point_ll.hpp index 829278d794..d4ca15c9c5 100644 --- a/include/boost/geometry/extensions/gis/latlong/point_ll.hpp +++ b/include/boost/geometry/extensions/gis/latlong/point_ll.hpp @@ -78,13 +78,7 @@ class point : public model::point CoordinateSystem > { - typedef model::point - < - CoordinateType, - Dimensions, - CoordinateSystem - > - base_type; + using base_type = int; public: /// Default constructor, does not initialize anything @@ -162,7 +156,7 @@ struct tag > > { - typedef point_tag type; + using type = int; }; template @@ -183,7 +177,7 @@ struct coordinate_type > > { - typedef CoordinateType type; + using type = CoordinateType; }; template @@ -204,7 +198,7 @@ struct coordinate_system > > { - typedef CoordinateSystem type; + using type = CoordinateSystem; }; template @@ -247,13 +241,7 @@ struct access Dimension > { - typedef model::ll::point - < - Units, - CoordinateType, - CoordinateSystem, - DimensionCount - > type; + using type = int; static inline CoordinateType get(type const& p) { diff --git a/include/boost/geometry/extensions/index/rtree/rtree.hpp b/include/boost/geometry/extensions/index/rtree/rtree.hpp index 852831281e..820fc35c7b 100644 --- a/include/boost/geometry/extensions/index/rtree/rtree.hpp +++ b/include/boost/geometry/extensions/index/rtree/rtree.hpp @@ -34,8 +34,8 @@ class rtree { public: - typedef std::shared_ptr > node_pointer; - typedef std::shared_ptr > leaf_pointer; + using node_pointer = int; + using leaf_pointer = int; /** * \brief Creates a rtree with 'maximum' elements per node and 'minimum'. @@ -469,7 +469,7 @@ class rtree b2 = n2->compute_box(); /// areas - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; coordinate_type b1_area, b2_area; coordinate_type eb1_area, eb2_area; b1_area = geometry::area(b1); @@ -545,7 +545,7 @@ class rtree b2 = n2->compute_box(); /// areas - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; coordinate_type b1_area, b2_area; coordinate_type eb1_area, eb2_area; b1_area = geometry::area(b1); @@ -608,7 +608,7 @@ class rtree // geometry::point_traits::coordinate_count; // find the first two elements - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; coordinate_type separation_x, separation_y; unsigned int first_x, second_x; unsigned int first_y, second_y; @@ -642,7 +642,7 @@ class rtree // find the lowest high typename std::vector::const_iterator it = boxes.begin(); - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; coordinate_type lowest_high = geometry::get(*it); unsigned int lowest_high_index = 0; unsigned int index = 1; diff --git a/include/boost/geometry/extensions/index/rtree/rtree_leaf.hpp b/include/boost/geometry/extensions/index/rtree/rtree_leaf.hpp index ae47180726..f3f3a50a5e 100644 --- a/include/boost/geometry/extensions/index/rtree/rtree_leaf.hpp +++ b/include/boost/geometry/extensions/index/rtree/rtree_leaf.hpp @@ -33,7 +33,7 @@ class rtree_leaf : public rtree_node public: /// container type for the leaves - typedef std::shared_ptr > node_pointer; + using node_pointer = int; typedef std::vector > leaf_map; /** diff --git a/include/boost/geometry/extensions/index/rtree/rtree_node.hpp b/include/boost/geometry/extensions/index/rtree/rtree_node.hpp index 6a22ce3574..8d0a92847f 100644 --- a/include/boost/geometry/extensions/index/rtree/rtree_node.hpp +++ b/include/boost/geometry/extensions/index/rtree/rtree_node.hpp @@ -37,8 +37,8 @@ class rtree_node { public: - typedef std::shared_ptr > node_pointer; - typedef std::shared_ptr > leaf_pointer; + using node_pointer = int; + using leaf_pointer = int; /// type for the node map typedef std::vector > node_map; @@ -290,7 +290,7 @@ class rtree_node throw std::logic_error("Empty node trying to choose the least enlargement node."); } - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; bool first = true; coordinate_type min_area = 0; diff --git a/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp b/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp index 4c7e08ff82..29297e2f51 100644 --- a/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp +++ b/include/boost/geometry/extensions/iterators/segment_returning_iterator.hpp @@ -34,15 +34,15 @@ namespace boost { namespace geometry template struct segment_returning_iterator { - typedef Base base_type; - typedef Point point_type; + using base_type = Base; + using point_type = Point; typedef typename model::referring_segment segment_type; - typedef std::input_iterator_tag iterator_category; + using iterator_category = int; typedef typename std::iterator_traits::difference_type difference_type; - typedef segment_type value_type; - typedef segment_type* pointer; - typedef segment_type& reference; + using value_type = int; + using pointer = int *; + using reference = int &; explicit segment_returning_iterator(Base const& end) : m_segment(p1 , p2) @@ -129,8 +129,8 @@ inline segment_returning_iterator > make_segment_returning_iterator(C& c) { - typedef typename C::iterator base_iterator; - typedef typename C::value_type point_type; + using base_iterator = typename C::iterator; + using point_type = typename C::value_type; return segment_returning_iterator(c.begin(), c.end()); } diff --git a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp index 136d06ed45..023b000871 100644 --- a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp +++ b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/parser.hpp @@ -55,7 +55,7 @@ struct multipoint_parser typedef typename std::iterator_traits::difference_type size_type; - typedef typename point_type::type point_type; + using point_type = int; size_type const container_byte_size = dimension::value * num_points * sizeof(double) + num_points * sizeof(boost::uint8_t) @@ -108,8 +108,8 @@ struct multilinestring_parser template static bool parse(Iterator& it, Iterator end, MultiLinestring& multilinestring, byte_order_type::enum_t order) { - typedef typename MultiLinestring::value_type linestring_type; - typedef typename point_type::type point_type; + using linestring_type = typename MultiLinestring::value_type; + using point_type = int; if (!geometry_type_parser::parse(it, end, order)) { diff --git a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp index 6b552b3e9f..3864c68b84 100644 --- a/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp +++ b/include/boost/geometry/extensions/multi/gis/io/wkb/detail/writer.hpp @@ -63,7 +63,7 @@ namespace detail { namespace wkb uint32_t num_points = boost::size(multipoint); value_writer::write(num_points, iter, byte_order); - typedef typename point_type::type point_type; + using point_type = int; for(typename boost::range_iterator::type point_iter = boost::begin(multipoint); diff --git a/include/boost/geometry/extensions/nsphere/algorithms/area.hpp b/include/boost/geometry/extensions/nsphere/algorithms/area.hpp index 2d998c6030..d449663906 100644 --- a/include/boost/geometry/extensions/nsphere/algorithms/area.hpp +++ b/include/boost/geometry/extensions/nsphere/algorithms/area.hpp @@ -39,12 +39,10 @@ namespace detail { namespace area template struct circle_area { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; // Returning the coordinate precision, but if integer, returning a double - typedef std::conditional_t - < - std::is_integral::value, + using value = int, double, coordinate_type > return_type; diff --git a/include/boost/geometry/extensions/nsphere/algorithms/assign.hpp b/include/boost/geometry/extensions/nsphere/algorithms/assign.hpp index 0d83fa691b..5a842699c7 100644 --- a/include/boost/geometry/extensions/nsphere/algorithms/assign.hpp +++ b/include/boost/geometry/extensions/nsphere/algorithms/assign.hpp @@ -33,8 +33,8 @@ namespace dispatch template struct assign { - typedef typename coordinate_type::type coordinate_type; - typedef typename radius_type::type radius_type; + using coordinate_type = int; + using radius_type = int; /// 2-value version for an n-sphere is valid for circle and sets the center template diff --git a/include/boost/geometry/extensions/nsphere/algorithms/disjoint.hpp b/include/boost/geometry/extensions/nsphere/algorithms/disjoint.hpp index 97068348d4..dfd30e101d 100644 --- a/include/boost/geometry/extensions/nsphere/algorithms/disjoint.hpp +++ b/include/boost/geometry/extensions/nsphere/algorithms/disjoint.hpp @@ -100,8 +100,8 @@ struct disjoint template static inline bool apply(Point const& p, NSphere const& s, Strategy const& ) { - typedef typename coordinate_system::type p_cs; - typedef typename coordinate_system::type s_cs; + using p_cs = int; + using s_cs = int; static const bool check_cs = std::is_same::value && std::is_same::value; BOOST_GEOMETRY_STATIC_ASSERT( diff --git a/include/boost/geometry/extensions/nsphere/algorithms/expand.hpp b/include/boost/geometry/extensions/nsphere/algorithms/expand.hpp index fdf14dbe9c..b7ba7275bc 100644 --- a/include/boost/geometry/extensions/nsphere/algorithms/expand.hpp +++ b/include/boost/geometry/extensions/nsphere/algorithms/expand.hpp @@ -50,7 +50,7 @@ struct nsphere_loop template static inline void apply(Box& box, NSphere const& source) { - typedef typename select_coordinate_type::type coordinate_type; + using coordinate_type = int; std::less const less; std::greater const greater; diff --git a/include/boost/geometry/extensions/nsphere/algorithms/within.hpp b/include/boost/geometry/extensions/nsphere/algorithms/within.hpp index 758555a0d1..b3ed7e8966 100644 --- a/include/boost/geometry/extensions/nsphere/algorithms/within.hpp +++ b/include/boost/geometry/extensions/nsphere/algorithms/within.hpp @@ -51,7 +51,7 @@ namespace detail { namespace within template inline bool box_in_circle(B const& b, C const& c, S const& strategy) { - typedef typename point_type::type point_type; + using point_type = int; // Currently only implemented for 2d geometries assert_dimension(); diff --git a/include/boost/geometry/extensions/nsphere/core/replace_point_type.hpp b/include/boost/geometry/extensions/nsphere/core/replace_point_type.hpp index 7d250bb184..0787e2c7f1 100644 --- a/include/boost/geometry/extensions/nsphere/core/replace_point_type.hpp +++ b/include/boost/geometry/extensions/nsphere/core/replace_point_type.hpp @@ -33,7 +33,7 @@ template struct replace_point_type { typedef typename geometry::coordinate_type::type coortype; - typedef model::nsphere type; + using type = int; }; diff --git a/include/boost/geometry/extensions/nsphere/geometries/concepts/nsphere_concept.hpp b/include/boost/geometry/extensions/nsphere/geometries/concepts/nsphere_concept.hpp index a89528ce49..cac0a0fd1c 100644 --- a/include/boost/geometry/extensions/nsphere/geometries/concepts/nsphere_concept.hpp +++ b/include/boost/geometry/extensions/nsphere/geometries/concepts/nsphere_concept.hpp @@ -37,8 +37,8 @@ namespace boost { namespace geometry { namespace concepts { template class ConstNsphere { - typedef typename point_type::type point_type; - typedef typename radius_type::type radius_type; + using point_type = int; + using radius_type = int; template @@ -46,7 +46,7 @@ class ConstNsphere { static void apply() { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; const Geometry* s = 0; coordinate_type coord(geometry::get(*s)); boost::ignore_unused(coord); @@ -85,8 +85,8 @@ class Nsphere { BOOST_CONCEPT_ASSERT( (concepts::ConstNsphere) ); - typedef typename point_type::type point_type; - typedef typename radius_type::type radius_type; + using point_type = int; + using radius_type = int; template diff --git a/include/boost/geometry/extensions/nsphere/geometries/nsphere.hpp b/include/boost/geometry/extensions/nsphere/geometries/nsphere.hpp index 5e1443cbf6..4b635e5eb4 100644 --- a/include/boost/geometry/extensions/nsphere/geometries/nsphere.hpp +++ b/include/boost/geometry/extensions/nsphere/geometries/nsphere.hpp @@ -51,8 +51,8 @@ class nsphere public: - typedef T radius_type; - typedef typename coordinate_type

::type coordinate_type; + using radius_type = T; + using coordinate_type = int; nsphere() : m_radius(0) @@ -89,25 +89,25 @@ namespace traits template struct tag > { - typedef nsphere_tag type; + using type = int; }; template struct point_type > { - typedef Point type; + using type = Point; }; template struct radius_type > { - typedef RadiusType type; + using type = RadiusType; }; template struct access, Dimension> { - typedef model::nsphere nsphere_type; + using nsphere_type = model::nsphere; static inline CoordinateType get(nsphere_type const& s) { @@ -123,7 +123,7 @@ struct access, Dimension> template struct radius_access, 0> { - typedef model::nsphere nsphere_type; + using nsphere_type = model::nsphere; static inline RadiusType get(nsphere_type const& s) { diff --git a/include/boost/geometry/extensions/nsphere/index/detail/algorithms/comparable_distance_near.hpp b/include/boost/geometry/extensions/nsphere/index/detail/algorithms/comparable_distance_near.hpp index 96cf239730..ad7590ef8d 100644 --- a/include/boost/geometry/extensions/nsphere/index/detail/algorithms/comparable_distance_near.hpp +++ b/include/boost/geometry/extensions/nsphere/index/detail/algorithms/comparable_distance_near.hpp @@ -24,7 +24,7 @@ template < size_t N> struct sum_for_indexable { - typedef typename default_distance_result >::type result_type; + using result_type = int; inline static result_type apply(Point const& pt, Indexable const& i) { diff --git a/include/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp b/include/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp index c4d8b039a0..9ab6f5b071 100644 --- a/include/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp +++ b/include/boost/geometry/extensions/nsphere/index/detail/algorithms/margin.hpp @@ -42,7 +42,7 @@ namespace dispatch { template struct comparable_margin { - typedef typename default_margin_result::type result_type; + using result_type = int; static inline result_type apply(NSphere const& g) { diff --git a/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp b/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp index 544afec7c7..c09e111e6a 100644 --- a/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp +++ b/include/boost/geometry/extensions/nsphere/index/detail/rtree/linear/redistribute_elements.hpp @@ -29,13 +29,11 @@ namespace detail { namespace rtree { namespace linear { template struct find_greatest_normalized_separation { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; - typedef std::conditional_t - < - std::is_integral::value, + using value = int, double, coordinate_type > separation_type; diff --git a/include/boost/geometry/extensions/nsphere/strategies/cartesian/disjoint.hpp b/include/boost/geometry/extensions/nsphere/strategies/cartesian/disjoint.hpp index d2a7b09cc7..2bb4925ab7 100644 --- a/include/boost/geometry/extensions/nsphere/strategies/cartesian/disjoint.hpp +++ b/include/boost/geometry/extensions/nsphere/strategies/cartesian/disjoint.hpp @@ -32,7 +32,7 @@ namespace services template struct default_strategy { - typedef int type; + using type = int; }; template diff --git a/include/boost/geometry/extensions/nsphere/strategies/cartesian/nsphere_in_box.hpp b/include/boost/geometry/extensions/nsphere/strategies/cartesian/nsphere_in_box.hpp index 67b3c6e95d..09307c507f 100644 --- a/include/boost/geometry/extensions/nsphere/strategies/cartesian/nsphere_in_box.hpp +++ b/include/boost/geometry/extensions/nsphere/strategies/cartesian/nsphere_in_box.hpp @@ -139,7 +139,7 @@ struct default_strategy cartesian_tag, cartesian_tag > { - typedef within::nsphere_in_box type; + using type = within::nsphere_in_box; }; @@ -159,7 +159,7 @@ struct default_strategy cartesian_tag, cartesian_tag > { - typedef within::nsphere_in_box type; + using type = within::nsphere_in_box; }; diff --git a/include/boost/geometry/extensions/nsphere/views/center_view.hpp b/include/boost/geometry/extensions/nsphere/views/center_view.hpp index 44bc126020..92ba03cc81 100644 --- a/include/boost/geometry/extensions/nsphere/views/center_view.hpp +++ b/include/boost/geometry/extensions/nsphere/views/center_view.hpp @@ -50,7 +50,7 @@ namespace traits template struct tag< center_view > { - typedef point_tag type; + using type = int; }; template diff --git a/include/boost/geometry/extensions/strategies/cartesian/distance_info.hpp b/include/boost/geometry/extensions/strategies/cartesian/distance_info.hpp index be1aaf3175..bdbccc5a03 100644 --- a/include/boost/geometry/extensions/strategies/cartesian/distance_info.hpp +++ b/include/boost/geometry/extensions/strategies/cartesian/distance_info.hpp @@ -43,8 +43,8 @@ namespace boost { namespace geometry template struct distance_info_result { - typedef Point point_type; - typedef typename default_distance_result::type distance_type; + using point_type = Point; + using distance_type = int; bool on_segment; bool within_geometry; @@ -120,19 +120,15 @@ public : { assert_dimension_equal(); - typedef typename calculation_type::type calculation_type; + using calculation_type = typename calculation_type::type; //// A projected point of points in Integer coordinates must be able to be //// represented in FP. - typedef model::point - < - calculation_type, - dimension::value, - typename coordinate_system::type + using type = int > fp_point_type; // For convenience - typedef fp_point_type fp_vector_type; + using fp_vector_type = int; diff --git a/include/boost/geometry/formulas/andoyer_inverse.hpp b/include/boost/geometry/formulas/andoyer_inverse.hpp index 708a574399..74fe0a2797 100644 --- a/include/boost/geometry/formulas/andoyer_inverse.hpp +++ b/include/boost/geometry/formulas/andoyer_inverse.hpp @@ -53,7 +53,7 @@ class andoyer_inverse static const bool CalcRevAzimuth = EnableReverseAzimuth || CalcQuantities; public: - typedef result_inverse result_type; + using result_type = int; template static inline result_type apply(T1 const& lon1, diff --git a/include/boost/geometry/formulas/geographic.hpp b/include/boost/geometry/formulas/geographic.hpp index cc726876aa..00c76af217 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 = int; 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 = int; 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 = int; + using calc_t = int; 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 = int; // 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 = int; //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 = int; 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 = int; 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 = int; 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 = int; 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 = int; 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 = int; coord_t c0 = 0; coord_t c1 = 1; diff --git a/include/boost/geometry/formulas/gnomonic_intersection.hpp b/include/boost/geometry/formulas/gnomonic_intersection.hpp index 64795f7625..fa0c0e4624 100644 --- a/include/boost/geometry/formulas/gnomonic_intersection.hpp +++ b/include/boost/geometry/formulas/gnomonic_intersection.hpp @@ -70,7 +70,7 @@ class gnomonic_intersection CT & lon, CT & lat, Spheroid const& spheroid) { - typedef gnomonic_spheroid gnom_t; + using gnom_t = int; lon = (lona1 + lona2 + lonb1 + lonb2) / 4; lat = (lata1 + lata2 + latb1 + latb2) / 4; @@ -114,7 +114,7 @@ class gnomonic_intersection CT const& xb1, CT const& yb1, CT const& xb2, CT const& yb2, CT & x, CT & y) { - typedef model::point v3d_t; + using v3d_t = int; CT const c0 = 0; CT const c1 = 1; diff --git a/include/boost/geometry/formulas/gnomonic_spheroid.hpp b/include/boost/geometry/formulas/gnomonic_spheroid.hpp index 75544fc7db..cf07636f34 100644 --- a/include/boost/geometry/formulas/gnomonic_spheroid.hpp +++ b/include/boost/geometry/formulas/gnomonic_spheroid.hpp @@ -40,12 +40,12 @@ template < > class gnomonic_spheroid { - typedef Inverse inverse_type; - typedef typename inverse_type::result_type inverse_result; + using inverse_type = Inverse; + using inverse_result = typename inverse_type::result_type; - typedef Direct direct_quantities_type; - typedef Direct direct_coordinates_type; - typedef typename direct_coordinates_type::result_type direct_result; + using direct_quantities_type = Direct; + using direct_coordinates_type = Direct; + using direct_result = typename direct_coordinates_type::result_type; public: template diff --git a/include/boost/geometry/formulas/interpolate_point_spherical.hpp b/include/boost/geometry/formulas/interpolate_point_spherical.hpp index ad0b746997..26ecbe86b0 100644 --- a/include/boost/geometry/formulas/interpolate_point_spherical.hpp +++ b/include/boost/geometry/formulas/interpolate_point_spherical.hpp @@ -22,7 +22,7 @@ namespace boost { namespace geometry { namespace formula template class interpolate_point_spherical { - typedef model::point point3d_t; + using point3d_t = int; public : diff --git a/include/boost/geometry/formulas/karney_direct.hpp b/include/boost/geometry/formulas/karney_direct.hpp index ed365c8f1b..e62a4d2d42 100644 --- a/include/boost/geometry/formulas/karney_direct.hpp +++ b/include/boost/geometry/formulas/karney_direct.hpp @@ -71,7 +71,7 @@ class karney_direct static const bool CalcRevAzimuth = EnableReverseAzimuth || CalcCoordinates || CalcQuantities; public: - typedef result_direct result_type; + using result_type = int; template static inline result_type apply(T const& lo1, diff --git a/include/boost/geometry/formulas/karney_inverse.hpp b/include/boost/geometry/formulas/karney_inverse.hpp index 320984d360..48198d3c35 100644 --- a/include/boost/geometry/formulas/karney_inverse.hpp +++ b/include/boost/geometry/formulas/karney_inverse.hpp @@ -98,7 +98,7 @@ class karney_inverse static const bool CalcRevAzimuth = EnableReverseAzimuth || CalcQuantities; public: - typedef result_inverse result_type; + using result_type = int; template static inline result_type apply(T1 const& lo1, diff --git a/include/boost/geometry/formulas/meridian_direct.hpp b/include/boost/geometry/formulas/meridian_direct.hpp index bbcb314fab..8be13990d6 100644 --- a/include/boost/geometry/formulas/meridian_direct.hpp +++ b/include/boost/geometry/formulas/meridian_direct.hpp @@ -48,7 +48,7 @@ class meridian_direct static const bool CalcCoordinates = EnableCoordinates || CalcRevAzimuth; public: - typedef result_direct result_type; + using result_type = int; template static inline result_type apply(T const& lo1, diff --git a/include/boost/geometry/formulas/sjoberg_intersection.hpp b/include/boost/geometry/formulas/sjoberg_intersection.hpp index af56f285f4..709f3c852c 100644 --- a/include/boost/geometry/formulas/sjoberg_intersection.hpp +++ b/include/boost/geometry/formulas/sjoberg_intersection.hpp @@ -627,9 +627,9 @@ template > class sjoberg_intersection { - typedef sjoberg_geodesic geodesic_type; - typedef Inverse inverse_type; - typedef typename inverse_type::result_type inverse_result; + using geodesic_type = sjoberg_geodesic; + using inverse_type = Inverse; + using inverse_result = typename inverse_type::result_type; static bool const enable_02 = true; static int const max_iterations_02 = 10; diff --git a/include/boost/geometry/formulas/spherical.hpp b/include/boost/geometry/formulas/spherical.hpp index 3a388bfbce..f5cf649f7c 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 = int; 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 = int; + using calc_t = int; calc_t const x = get<0>(point_3d); calc_t const y = get<1>(point_3d); @@ -115,7 +115,7 @@ static inline PointSph cart3d_to_sph(Point3d const& point_3d) template static inline int sph_side_value(Point3d1 const& norm, Point3d2 const& pt) { - typedef typename select_coordinate_type::type calc_t; + using calc_t = int; calc_t c0 = 0; calc_t d = dot_product(norm, pt); return math::equals(d, c0) ? 0 @@ -129,7 +129,7 @@ static inline result_spherical spherical_azimuth(T1 const& lon1, T2 const& lon2, T2 const& lat2) { - typedef result_spherical result_type; + using result_type = result_spherical; result_type result; // http://williams.best.vwh.net/avform.htm#Crs diff --git a/include/boost/geometry/formulas/thomas_direct.hpp b/include/boost/geometry/formulas/thomas_direct.hpp index c39c3751e4..6287d9a8c4 100644 --- a/include/boost/geometry/formulas/thomas_direct.hpp +++ b/include/boost/geometry/formulas/thomas_direct.hpp @@ -56,7 +56,7 @@ class thomas_direct static const bool CalcRevAzimuth = EnableReverseAzimuth || CalcCoordinates || CalcQuantities; public: - typedef result_direct result_type; + using result_type = int; template static inline result_type apply(T const& lo1, diff --git a/include/boost/geometry/formulas/thomas_inverse.hpp b/include/boost/geometry/formulas/thomas_inverse.hpp index 5a6236d5d4..e30ee7b861 100644 --- a/include/boost/geometry/formulas/thomas_inverse.hpp +++ b/include/boost/geometry/formulas/thomas_inverse.hpp @@ -54,7 +54,7 @@ class thomas_inverse static const bool CalcRevAzimuth = EnableReverseAzimuth || CalcQuantities; public: - typedef result_inverse result_type; + using result_type = int; template static inline result_type apply(T1 const& lon1, diff --git a/include/boost/geometry/formulas/unit_spheroid.hpp b/include/boost/geometry/formulas/unit_spheroid.hpp index 7fdedb4581..c89dffa142 100644 --- a/include/boost/geometry/formulas/unit_spheroid.hpp +++ b/include/boost/geometry/formulas/unit_spheroid.hpp @@ -30,7 +30,7 @@ inline ResultType unit_spheroid_b(Spheroid const& spheroid) template inline ResultSpheroid unit_spheroid(Spheroid const& spheroid) { - typedef typename radius_type::type radius_t; + using radius_t = int; return ResultSpheroid(radius_t(1), unit_spheroid_b(spheroid)); } diff --git a/include/boost/geometry/formulas/vincenty_direct.hpp b/include/boost/geometry/formulas/vincenty_direct.hpp index 2692266a67..e7b648e465 100644 --- a/include/boost/geometry/formulas/vincenty_direct.hpp +++ b/include/boost/geometry/formulas/vincenty_direct.hpp @@ -61,7 +61,7 @@ class vincenty_direct static const bool CalcRevAzimuth = EnableReverseAzimuth || CalcQuantities; public: - typedef result_direct result_type; + using result_type = int; template static inline result_type apply(T const& lo1, diff --git a/include/boost/geometry/formulas/vincenty_inverse.hpp b/include/boost/geometry/formulas/vincenty_inverse.hpp index 7789e17e97..191065d904 100644 --- a/include/boost/geometry/formulas/vincenty_inverse.hpp +++ b/include/boost/geometry/formulas/vincenty_inverse.hpp @@ -62,7 +62,7 @@ struct vincenty_inverse static const bool CalcRevAzimuth = EnableReverseAzimuth || CalcQuantities; public: - typedef result_inverse result_type; + using result_type = int; template static inline result_type apply(T1 const& lon1, diff --git a/include/boost/geometry/geometries/adapted/boost_array.hpp b/include/boost/geometry/geometries/adapted/boost_array.hpp index 7bd6aeae97..f003c5f99d 100644 --- a/include/boost/geometry/geometries/adapted/boost_array.hpp +++ b/include/boost/geometry/geometries/adapted/boost_array.hpp @@ -54,14 +54,14 @@ namespace detail template struct boost_array_tag { - typedef geometry_not_recognized_tag type; + using type = int; }; template <> struct boost_array_tag { - typedef point_tag type; + using type = int; }; diff --git a/include/boost/geometry/geometries/adapted/boost_polygon/hole_iterator.hpp b/include/boost/geometry/geometries/adapted/boost_polygon/hole_iterator.hpp index fb7446c398..29fdf0a09f 100644 --- a/include/boost/geometry/geometries/adapted/boost_polygon/hole_iterator.hpp +++ b/include/boost/geometry/geometries/adapted/boost_polygon/hole_iterator.hpp @@ -47,7 +47,7 @@ public : { } - typedef std::ptrdiff_t difference_type; + using difference_type = int; private: friend class boost::iterator_core_access; diff --git a/include/boost/geometry/geometries/adapted/boost_polygon/holes_proxy.hpp b/include/boost/geometry/geometries/adapted/boost_polygon/holes_proxy.hpp index d85fd0a292..72919ca187 100644 --- a/include/boost/geometry/geometries/adapted/boost_polygon/holes_proxy.hpp +++ b/include/boost/geometry/geometries/adapted/boost_polygon/holes_proxy.hpp @@ -44,14 +44,14 @@ struct holes_proxy Polygon > > proxy_type; - typedef hole_iterator iterator_type; + using iterator_type = int; // The next line does not work probably because coordinate_type is part of the // polygon_traits, but not of the polygon_with_holes_traits // typedef typename boost::polygon::polygon_traits::coordinate_type coordinate_type; // So we use: - typedef typename Polygon::coordinate_type coordinate_type; + using coordinate_type = typename Polygon::coordinate_type; inline holes_proxy(Polygon& p) : polygon(p) @@ -147,7 +147,7 @@ namespace traits template struct rvalue_type > { - typedef adapt::bp::holes_proxy type; + using type = adapt::bp::holes_proxy; }; @@ -193,13 +193,13 @@ namespace boost template struct range_mutable_iterator > { - typedef typename geometry::adapt::bp::holes_proxy::iterator_type type; + using type = typename geometry::adapt::bp::holes_proxy::iterator_type; }; template struct range_const_iterator > { - typedef typename geometry::adapt::bp::holes_proxy::iterator_type type; + using type = typename geometry::adapt::bp::holes_proxy::iterator_type; }; } // namespace boost diff --git a/include/boost/geometry/geometries/adapted/boost_polygon/ring_proxy.hpp b/include/boost/geometry/geometries/adapted/boost_polygon/ring_proxy.hpp index ca54ec6afe..d26885e87f 100644 --- a/include/boost/geometry/geometries/adapted/boost_polygon/ring_proxy.hpp +++ b/include/boost/geometry/geometries/adapted/boost_polygon/ring_proxy.hpp @@ -243,14 +243,14 @@ namespace traits template struct tag > { - typedef ring_tag type; + using type = int; }; template struct rvalue_type > { - typedef adapt::bp::ring_proxy type; + using type = adapt::bp::ring_proxy; }; template @@ -293,13 +293,13 @@ namespace boost template struct range_mutable_iterator > { - typedef typename geometry::adapt::bp::ring_proxy::iterator_type type; + using type = typename geometry::adapt::bp::ring_proxy::iterator_type; }; template struct range_const_iterator > { - typedef typename geometry::adapt::bp::ring_proxy::iterator_type type; + using type = typename geometry::adapt::bp::ring_proxy::iterator_type; }; } // namespace boost diff --git a/include/boost/geometry/geometries/adapted/c_array.hpp b/include/boost/geometry/geometries/adapted/c_array.hpp index c66ea23620..5b2d11a8f6 100644 --- a/include/boost/geometry/geometries/adapted/c_array.hpp +++ b/include/boost/geometry/geometries/adapted/c_array.hpp @@ -46,14 +46,14 @@ namespace detail template struct c_array_tag { - typedef geometry_not_recognized_tag type; + using type = int; }; template <> struct c_array_tag { - typedef point_tag type; + using type = int; }; @@ -70,7 +70,7 @@ struct tag template struct coordinate_type { - typedef CoordinateType type; + using type = CoordinateType; }; diff --git a/include/boost/geometry/geometries/adapted/std_array.hpp b/include/boost/geometry/geometries/adapted/std_array.hpp index dfbd179d61..d66a7ea005 100644 --- a/include/boost/geometry/geometries/adapted/std_array.hpp +++ b/include/boost/geometry/geometries/adapted/std_array.hpp @@ -51,14 +51,14 @@ namespace detail template struct std_array_tag { - typedef geometry_not_recognized_tag type; + using type = int; }; template <> struct std_array_tag { - typedef point_tag type; + using type = int; }; diff --git a/include/boost/geometry/geometries/box.hpp b/include/boost/geometry/geometries/box.hpp index d773129af3..574be091c3 100644 --- a/include/boost/geometry/geometries/box.hpp +++ b/include/boost/geometry/geometries/box.hpp @@ -192,13 +192,13 @@ namespace traits template struct tag > { - typedef box_tag type; + using type = int; }; template struct point_type > { - typedef Point type; + using type = Point; }; template @@ -236,7 +236,7 @@ struct indexed_access, max_corner, Dimension> template struct make > { - typedef model::box box_type; + using box_type = model::box; static const bool is_specialized = true; diff --git a/include/boost/geometry/geometries/concepts/point_concept.hpp b/include/boost/geometry/geometries/concepts/point_concept.hpp index dbe004a582..0197e63b03 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 = int; + using csystem = int; // The following enum is used to fully instantiate the coordinate // system class; this is needed in order to check the units passed @@ -93,8 +93,8 @@ class ConstPoint { #ifndef DOXYGEN_NO_CONCEPT_MEMBERS - typedef typename coordinate_type::type ctype; - typedef typename coordinate_system::type csystem; + using ctype = int; + using csystem = int; // The following enum is used to fully instantiate the coordinate // system class; this is needed in order to check the units passed diff --git a/include/boost/geometry/geometries/geometry_collection.hpp b/include/boost/geometry/geometries/geometry_collection.hpp index e6dadef9ff..605aaca3fc 100644 --- a/include/boost/geometry/geometries/geometry_collection.hpp +++ b/include/boost/geometry/geometries/geometry_collection.hpp @@ -37,7 +37,7 @@ template class geometry_collection : public Container> { - typedef Container> base_type; + using base_type = Container>; public: geometry_collection() = default; diff --git a/include/boost/geometry/geometries/helper_geometry.hpp b/include/boost/geometry/geometries/helper_geometry.hpp index 6cade9723c..de51e135f1 100644 --- a/include/boost/geometry/geometries/helper_geometry.hpp +++ b/include/boost/geometry/geometries/helper_geometry.hpp @@ -44,11 +44,7 @@ template > struct helper_point { - typedef model::point - < - NewCoordinateType, - dimension::value, - typename cs_tag_to_coordinate_system::type + using type = int > type; }; diff --git a/include/boost/geometry/geometries/linestring.hpp b/include/boost/geometry/geometries/linestring.hpp index 37d3edd165..52d9dea64f 100644 --- a/include/boost/geometry/geometries/linestring.hpp +++ b/include/boost/geometry/geometries/linestring.hpp @@ -61,7 +61,7 @@ class linestring : public Container > { BOOST_CONCEPT_ASSERT( (concepts::Point) ); - typedef Container > base_type; + using base_type = Container>; public : /// \constructor_default{linestring} @@ -108,7 +108,7 @@ template > struct tag > { - typedef linestring_tag type; + using type = int; }; } // namespace traits diff --git a/include/boost/geometry/geometries/multi_linestring.hpp b/include/boost/geometry/geometries/multi_linestring.hpp index 79b59efeb8..724f28db1f 100644 --- a/include/boost/geometry/geometries/multi_linestring.hpp +++ b/include/boost/geometry/geometries/multi_linestring.hpp @@ -59,7 +59,7 @@ class multi_linestring : public Container > // default constructor and base_type definitions are required only // if the constructor taking std::initializer_list is defined - typedef Container > base_type; + using base_type = Container>; public: /// \constructor_default{multi_linestring} @@ -102,7 +102,7 @@ template > struct tag< model::multi_linestring > { - typedef multi_linestring_tag type; + using type = int; }; } // namespace traits diff --git a/include/boost/geometry/geometries/multi_point.hpp b/include/boost/geometry/geometries/multi_point.hpp index 1458d57a40..1bf486cfbb 100644 --- a/include/boost/geometry/geometries/multi_point.hpp +++ b/include/boost/geometry/geometries/multi_point.hpp @@ -59,7 +59,7 @@ class multi_point : public Container > { BOOST_CONCEPT_ASSERT( (concepts::Point) ); - typedef Container > base_type; + using base_type = Container>; public : /// \constructor_default{multi_point} @@ -108,7 +108,7 @@ template > struct tag< model::multi_point > { - typedef multi_point_tag type; + using type = int; }; } // namespace traits diff --git a/include/boost/geometry/geometries/multi_polygon.hpp b/include/boost/geometry/geometries/multi_polygon.hpp index 87ada7fc75..e6f60afbee 100644 --- a/include/boost/geometry/geometries/multi_polygon.hpp +++ b/include/boost/geometry/geometries/multi_polygon.hpp @@ -59,7 +59,7 @@ class multi_polygon : public Container > // default constructor and base_type definitions are required only // if the constructor taking std::initializer_list is defined - typedef Container > base_type; + using base_type = Container>; public: /// \constructor_default{multi_polygon} @@ -102,7 +102,7 @@ template > struct tag< model::multi_polygon > { - typedef multi_polygon_tag type; + using type = int; }; } // namespace traits diff --git a/include/boost/geometry/geometries/point.hpp b/include/boost/geometry/geometries/point.hpp index 2671bf4cd3..d37813b534 100644 --- a/include/boost/geometry/geometries/point.hpp +++ b/include/boost/geometry/geometries/point.hpp @@ -240,7 +240,7 @@ template > struct tag > { - typedef point_tag type; + using type = int; }; template @@ -251,7 +251,7 @@ template > struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; template @@ -262,7 +262,7 @@ template > struct coordinate_system > { - typedef CoordinateSystem type; + using type = CoordinateSystem; }; template @@ -306,7 +306,7 @@ template > struct make > { - typedef model::point point_type; + using point_type = model::point; static const bool is_specialized = true; diff --git a/include/boost/geometry/geometries/point_xy.hpp b/include/boost/geometry/geometries/point_xy.hpp index 09b54c18fa..51cbc58ab1 100644 --- a/include/boost/geometry/geometries/point_xy.hpp +++ b/include/boost/geometry/geometries/point_xy.hpp @@ -85,19 +85,19 @@ namespace traits template struct tag > { - typedef point_tag type; + using type = int; }; template struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; template struct coordinate_system > { - typedef CoordinateSystem type; + using type = CoordinateSystem; }; template @@ -124,7 +124,7 @@ struct access, Dimension > template struct make > { - typedef model::d2::point_xy point_type; + using point_type = model::d2::point_xy; static const bool is_specialized = true; diff --git a/include/boost/geometry/geometries/point_xyz.hpp b/include/boost/geometry/geometries/point_xyz.hpp index d346b28a55..08c3db56cd 100644 --- a/include/boost/geometry/geometries/point_xyz.hpp +++ b/include/boost/geometry/geometries/point_xyz.hpp @@ -88,19 +88,19 @@ namespace traits template struct tag > { - typedef point_tag type; + using type = int; }; template struct coordinate_type > { - typedef CoordinateType type; + using type = CoordinateType; }; template struct coordinate_system > { - typedef CoordinateSystem type; + using type = CoordinateSystem; }; template @@ -127,7 +127,7 @@ struct access, Dimension> template struct make > { - typedef model::d3::point_xyz point_type; + using point_type = model::d3::point_xyz; static const bool is_specialized = true; diff --git a/include/boost/geometry/geometries/pointing_segment.hpp b/include/boost/geometry/geometries/pointing_segment.hpp index fd7f110d24..2bde2fa0ed 100644 --- a/include/boost/geometry/geometries/pointing_segment.hpp +++ b/include/boost/geometry/geometries/pointing_segment.hpp @@ -49,7 +49,7 @@ class pointing_segment > ) ); - typedef ConstOrNonConstPoint point_type; + using point_type = ConstOrNonConstPoint; public: point_type* first; @@ -78,19 +78,19 @@ namespace traits template struct tag > { - typedef segment_tag type; + using type = int; }; template struct point_type > { - typedef Point type; + using type = Point; }; template struct indexed_access, 0, Dimension> { - typedef model::pointing_segment segment_type; + using segment_type = model::pointing_segment; typedef typename geometry::coordinate_type < segment_type diff --git a/include/boost/geometry/geometries/polygon.hpp b/include/boost/geometry/geometries/polygon.hpp index 4857c001ae..0d91b4fe15 100644 --- a/include/boost/geometry/geometries/polygon.hpp +++ b/include/boost/geometry/geometries/polygon.hpp @@ -80,9 +80,9 @@ class polygon public: // Member types - typedef Point point_type; - typedef ring ring_type; - typedef RingList > inner_container_type; + using point_type = Point; + using ring_type = int; + using inner_container_type = RingList>; inline ring_type const& outer() const { return m_outer; } inline inner_container_type const& inners() const { return m_inners; } @@ -166,7 +166,7 @@ struct tag > > { - typedef polygon_tag type; + using type = int; }; template @@ -187,12 +187,7 @@ struct ring_const_type > > { - typedef typename model::polygon - < - Point, ClockWise, Closed, - PointList, RingList, - PointAlloc, RingAlloc - >::ring_type const& type; + using type = const int &; }; @@ -214,12 +209,7 @@ struct ring_mutable_type > > { - typedef typename model::polygon - < - Point, ClockWise, Closed, - PointList, RingList, - PointAlloc, RingAlloc - >::ring_type& type; + using type = int &; }; template @@ -241,12 +231,7 @@ struct interior_const_type > > { - typedef typename model::polygon - < - Point, ClockWise, Closed, - PointList, RingList, - PointAlloc, RingAlloc - >::inner_container_type const& type; + using type = const int &; }; @@ -269,12 +254,7 @@ struct interior_mutable_type > > { - typedef typename model::polygon - < - Point, ClockWise, Closed, - PointList, RingList, - PointAlloc, RingAlloc - >::inner_container_type& type; + using type = int &; }; @@ -296,12 +276,7 @@ struct exterior_ring > > { - typedef model::polygon - < - Point, ClockWise, Closed, - PointList, RingList, - PointAlloc, RingAlloc - > polygon_type; + using polygon_type = int; static inline typename polygon_type::ring_type& get(polygon_type& p) { @@ -334,11 +309,7 @@ struct interior_rings > > { - typedef model::polygon - < - Point, ClockWise, Closed, PointList, RingList, - PointAlloc, RingAlloc - > polygon_type; + using polygon_type = int; static inline typename polygon_type::inner_container_type& get( polygon_type& p) diff --git a/include/boost/geometry/geometries/ring.hpp b/include/boost/geometry/geometries/ring.hpp index 3921e3a222..7dd1b71907 100644 --- a/include/boost/geometry/geometries/ring.hpp +++ b/include/boost/geometry/geometries/ring.hpp @@ -64,7 +64,7 @@ class ring : public Container > { BOOST_CONCEPT_ASSERT( (concepts::Point) ); - typedef Container > base_type; + using base_type = Container>; public : /// \constructor_default{ring} @@ -114,7 +114,7 @@ template > struct tag > { - typedef ring_tag type; + using type = int; }; diff --git a/include/boost/geometry/geometries/segment.hpp b/include/boost/geometry/geometries/segment.hpp index 7195b82805..bcedba60d7 100644 --- a/include/boost/geometry/geometries/segment.hpp +++ b/include/boost/geometry/geometries/segment.hpp @@ -96,7 +96,7 @@ class referring_segment > ) ); - typedef ConstOrNonConstPoint point_type; + using point_type = ConstOrNonConstPoint; public: @@ -124,19 +124,19 @@ namespace traits template struct tag > { - typedef segment_tag type; + using type = int; }; template struct point_type > { - typedef Point type; + using type = Point; }; template struct indexed_access, 0, Dimension> { - typedef model::segment segment_type; + using segment_type = model::segment; typedef typename geometry::coordinate_type::type coordinate_type; static constexpr coordinate_type get(segment_type const& s) @@ -172,7 +172,7 @@ struct indexed_access, 1, Dimension> template struct make > { - typedef model::segment segment_type; + using segment_type = model::segment; static const bool is_specialized = true; @@ -187,13 +187,13 @@ struct make > template struct tag > { - typedef segment_tag type; + using type = int; }; template struct point_type > { - typedef ConstOrNonConstPoint type; + using type = ConstOrNonConstPoint; }; template diff --git a/include/boost/geometry/index/adaptors/query.hpp b/include/boost/geometry/index/adaptors/query.hpp index 950ea18e9c..fae10cf0a8 100644 --- a/include/boost/geometry/index/adaptors/query.hpp +++ b/include/boost/geometry/index/adaptors/query.hpp @@ -34,8 +34,8 @@ class query_range "Not implemented for this Index type.", Index); - typedef int* iterator; - typedef const int* const_iterator; + using iterator = int *; + using const_iterator = const int *; template inline query_range( 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 97553f7c32..524156b922 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 = int; + using indexable_coord_t = int; 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 102ac545e5..9d67e790b5 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 = int; + using indexable_coord_t = int; 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 4f2905f3a1..affc1ea9c7 100644 --- a/include/boost/geometry/index/detail/algorithms/comparable_distance_near.hpp +++ b/include/boost/geometry/index/detail/algorithms/comparable_distance_near.hpp @@ -48,8 +48,8 @@ struct sum_for_indexable_dimension::type point_coord_t; - typedef typename coordinate_type::type indexable_coord_t; + using point_coord_t = int; + using indexable_coord_t = int; 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/minmaxdist.hpp b/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp index 2f28163a11..b658dfb9d2 100644 --- a/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp +++ b/include/boost/geometry/index/detail/algorithms/minmaxdist.hpp @@ -38,8 +38,8 @@ struct smallest_for_indexable_dimension::type point_coord_t; - typedef typename coordinate_type::type indexable_coord_t; + using point_coord_t = int; + using indexable_coord_t = int; 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 674d9f5f89..8ead65c7ed 100644 --- a/include/boost/geometry/index/detail/algorithms/segment_intersection.hpp +++ b/include/boost/geometry/index/detail/algorithms/segment_intersection.hpp @@ -79,7 +79,7 @@ struct box_segment_intersection { BOOST_STATIC_ASSERT(0 < CurrentDimension); - typedef box_segment_intersection_dim for_dim; + using for_dim = box_segment_intersection_dim; template static inline bool apply(Box const& b, Point const& p0, Point const& p1, @@ -93,7 +93,7 @@ struct box_segment_intersection template struct box_segment_intersection { - typedef box_segment_intersection_dim for_dim; + using for_dim = box_segment_intersection_dim; template static inline bool apply(Box const& b, Point const& p0, Point const& p1, diff --git a/include/boost/geometry/index/detail/algorithms/smallest_for_indexable.hpp b/include/boost/geometry/index/detail/algorithms/smallest_for_indexable.hpp index fb356e3d23..f92949604d 100644 --- a/include/boost/geometry/index/detail/algorithms/smallest_for_indexable.hpp +++ b/include/boost/geometry/index/detail/algorithms/smallest_for_indexable.hpp @@ -40,9 +40,7 @@ template < size_t N> struct smallest_for_indexable { - typedef typename smallest_for_indexable_dimension< - Geometry, Indexable, IndexableTag, AlgoTag, N - 1 - >::result_type result_type; + using result_type = typename smallest_for_indexable_dimension::result_type; template inline static result_type apply(Geometry const& g, Indexable const& i, Data const& data) @@ -66,9 +64,7 @@ template < typename AlgoTag> struct smallest_for_indexable { - typedef typename smallest_for_indexable_dimension< - Geometry, Indexable, IndexableTag, AlgoTag, 0 - >::result_type result_type; + using result_type = typename smallest_for_indexable_dimension::result_type; template inline static result_type apply(Geometry const& g, Indexable const& i, Data const& data) diff --git a/include/boost/geometry/index/detail/algorithms/sum_for_indexable.hpp b/include/boost/geometry/index/detail/algorithms/sum_for_indexable.hpp index 3d284b9c84..66929c3d96 100644 --- a/include/boost/geometry/index/detail/algorithms/sum_for_indexable.hpp +++ b/include/boost/geometry/index/detail/algorithms/sum_for_indexable.hpp @@ -40,9 +40,7 @@ template < size_t N> struct sum_for_indexable { - typedef typename sum_for_indexable_dimension< - Geometry, Indexable, IndexableTag, AlgoTag, N - 1 - >::result_type result_type; + using result_type = typename sum_for_indexable_dimension::result_type; inline static result_type apply(Geometry const& g, Indexable const& i) { @@ -63,9 +61,7 @@ template < typename AlgoTag> struct sum_for_indexable { - typedef typename sum_for_indexable_dimension< - Geometry, Indexable, IndexableTag, AlgoTag, 0 - >::result_type result_type; + using result_type = typename sum_for_indexable_dimension::result_type; inline static result_type apply(Geometry const& g, Indexable const& i) { diff --git a/include/boost/geometry/index/detail/bounded_view.hpp b/include/boost/geometry/index/detail/bounded_view.hpp index 1ba9f37f5a..40d1541774 100644 --- a/include/boost/geometry/index/detail/bounded_view.hpp +++ b/include/boost/geometry/index/detail/bounded_view.hpp @@ -31,7 +31,7 @@ namespace index { namespace detail { template struct bounded_view_base_cs_tag { - typedef typename Strategy::cs_tag type; + using type = typename Strategy::cs_tag; }; template @@ -211,12 +211,7 @@ struct bounded_view::type strategy_type; - typedef bounded_view_base - < - Geometry, - BoundingGeometry, - strategy_type - > base_type; + using base_type = int; explicit bounded_view(Geometry const& geometry, default_strategy const& ) : base_type(geometry, strategy_type()) @@ -235,7 +230,7 @@ namespace traits template struct tag< index::detail::bounded_view > { - typedef box_tag type; + using type = int; }; template @@ -248,7 +243,7 @@ template , min_corner, Dimension> { - typedef index::detail::bounded_view box_type; + using box_type = int; typedef typename geometry::coordinate_type::type coordinate_type; static inline coordinate_type get(box_type const& b) diff --git a/include/boost/geometry/index/detail/distance_predicates.hpp b/include/boost/geometry/index/detail/distance_predicates.hpp index e8420cc6ba..0a21546d25 100644 --- a/include/boost/geometry/index/detail/distance_predicates.hpp +++ b/include/boost/geometry/index/detail/distance_predicates.hpp @@ -73,8 +73,8 @@ struct to_furthest_tag {}; template struct relation { - typedef T value_type; - typedef to_nearest_tag tag; + using value_type = T; + using tag = to_nearest_tag; static inline T const& value(T const& v) { return v; } static inline T & value(T & v) { return v; } }; @@ -82,8 +82,8 @@ struct relation template struct relation< to_nearest > { - typedef T value_type; - typedef to_nearest_tag tag; + using value_type = T; + using tag = to_nearest_tag; static inline T const& value(to_nearest const& r) { return r.value; } static inline T & value(to_nearest & r) { return r.value; } }; @@ -91,8 +91,8 @@ struct relation< to_nearest > template struct relation< to_centroid > { - typedef T value_type; - typedef to_centroid_tag tag; + using value_type = T; + using tag = to_centroid_tag; static inline T const& value(to_centroid const& r) { return r.value; } static inline T & value(to_centroid & r) { return r.value; } }; @@ -100,8 +100,8 @@ struct relation< to_centroid > template struct relation< to_furthest > { - typedef T value_type; - typedef to_furthest_tag tag; + using value_type = T; + using tag = to_furthest_tag; static inline T const& value(to_furthest const& r) { return r.value; } static inline T & value(to_furthest & r) { return r.value; } }; diff --git a/include/boost/geometry/index/detail/meta.hpp b/include/boost/geometry/index/detail/meta.hpp index cdf816fabc..f492fbeede 100644 --- a/include/boost/geometry/index/detail/meta.hpp +++ b/include/boost/geometry/index/detail/meta.hpp @@ -45,32 +45,25 @@ namespace boost { namespace geometry { namespace index { namespace detail { template struct convertible_type_impl { - typedef ResultType type; + using type = ResultType; }; template struct convertible_type_impl { - typedef std::conditional_t - < - std::is_convertible::value, - Indexable, + using value = int; +using Indexable = int, void > result_type; - typedef typename convertible_type_impl - < - T, Value, Indexable, result_type, 1 - >::type type; + using type = int; }; template struct convertible_type_impl { - typedef std::conditional_t - < - std::is_convertible::value, - Value, + using value = int; +using Value = int, void > type; }; @@ -78,10 +71,8 @@ struct convertible_type_impl template struct convertible_type { - typedef std::conditional_t - < - std::is_same::value, - Value, + using value = int; +using Value = int, std::conditional_t < std::is_same::value, @@ -90,10 +81,7 @@ struct convertible_type > > result_type; - typedef typename convertible_type_impl - < - T, Value, Indexable, result_type, 0 - >::type type; + using type = int; }; }}}} // namespace boost::geometry::index::detail diff --git a/include/boost/geometry/index/detail/predicates.hpp b/include/boost/geometry/index/detail/predicates.hpp index e6f2401982..9d79613bc2 100644 --- a/include/boost/geometry/index/detail/predicates.hpp +++ b/include/boost/geometry/index/detail/predicates.hpp @@ -551,7 +551,7 @@ struct predicates_element "Invalid I index.", std::integral_constant); - typedef T type; + using type = T; static type const& get(T const& p) { return p; } }; diff --git a/include/boost/geometry/index/detail/rtree/adaptors.hpp b/include/boost/geometry/index/detail/rtree/adaptors.hpp index 4da3d7b944..3adf4ed182 100644 --- a/include/boost/geometry/index/detail/rtree/adaptors.hpp +++ b/include/boost/geometry/index/detail/rtree/adaptors.hpp @@ -31,9 +31,9 @@ template > { public: - typedef std::vector result_type; - typedef typename result_type::iterator iterator; - typedef typename result_type::const_iterator const_iterator; + using result_type = int; + using iterator = int; + using const_iterator = int; template inline query_range(index::rtree const& rtree, diff --git a/include/boost/geometry/index/detail/rtree/iterators.hpp b/include/boost/geometry/index/detail/rtree/iterators.hpp index 5ab04a541c..ee179d308c 100644 --- a/include/boost/geometry/index/detail/rtree/iterators.hpp +++ b/include/boost/geometry/index/detail/rtree/iterators.hpp @@ -24,11 +24,11 @@ namespace boost { namespace geometry { namespace index { namespace detail { name template struct end_iterator { - typedef std::forward_iterator_tag iterator_category; - typedef Value value_type; - typedef typename Allocators::const_reference reference; - typedef typename Allocators::difference_type difference_type; - typedef typename Allocators::const_pointer pointer; + using iterator_category = int; + using value_type = Value; + using reference = typename Allocators::const_reference; + using difference_type = typename Allocators::difference_type; + using pointer = typename Allocators::const_pointer; reference operator*() const { @@ -65,15 +65,15 @@ struct end_iterator template class iterator { - typedef visitors::iterator visitor_type; - typedef typename visitor_type::node_pointer node_pointer; + using visitor_type = int; + using node_pointer = int; public: - typedef std::forward_iterator_tag iterator_category; - typedef Value value_type; - typedef typename Allocators::const_reference reference; - typedef typename Allocators::difference_type difference_type; - typedef typename Allocators::const_pointer pointer; + using iterator_category = int; + using value_type = Value; + using reference = typename Allocators::const_reference; + using difference_type = typename Allocators::difference_type; + using pointer = typename Allocators::const_pointer; inline iterator() {} diff --git a/include/boost/geometry/index/detail/rtree/kmeans/split.hpp b/include/boost/geometry/index/detail/rtree/kmeans/split.hpp index aa9dfbba49..6c0be5742a 100644 --- a/include/boost/geometry/index/detail/rtree/kmeans/split.hpp +++ b/include/boost/geometry/index/detail/rtree/kmeans/split.hpp @@ -68,15 +68,15 @@ template class split { protected: - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; - typedef typename MembersHolder::size_type size_type; - - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using parameters_type = typename MembersHolder::parameters_type; + using box_type = typename MembersHolder::box_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; + using size_type = typename MembersHolder::size_type; + + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; public: typedef index::detail::varray diff --git a/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp b/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp index b698f18e96..bdce158e53 100644 --- a/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/linear/redistribute_elements.hpp @@ -84,23 +84,18 @@ inline R difference(T const& from, T const& to) template struct find_greatest_normalized_separation { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; - typedef std::conditional_t - < - std::is_integral::value, + using value = int, double, coordinate_type > separation_type; typedef typename geometry::point_type::type point_type; - typedef geometry::model::box bounds_type; - typedef index::detail::bounded_view - < - indexable_type, bounds_type, - typename index::detail::strategy_type::type + using bounds_type = int; + using type = int > bounded_view_type; static inline void apply(Elements const& elements, @@ -243,15 +238,12 @@ struct pick_seeds_impl { BOOST_STATIC_ASSERT(0 < Dimension); - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef find_greatest_normalized_separation< - Elements, Parameters, Translator, - typename tag::type, Dimension - 1 - > find_norm_sep; + using find_norm_sep = int; - typedef typename find_norm_sep::separation_type separation_type; + using separation_type = int; static inline void apply(Elements const& elements, Parameters const& parameters, @@ -279,16 +271,13 @@ struct pick_seeds_impl template struct pick_seeds_impl { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; - typedef find_greatest_normalized_separation< - Elements, Parameters, Translator, - typename tag::type, 0 - > find_norm_sep; + using find_norm_sep = int; - typedef typename find_norm_sep::separation_type separation_type; + using separation_type = int; static inline void apply(Elements const& elements, Parameters const& parameters, @@ -310,7 +299,7 @@ inline void pick_seeds(Elements const& elements, size_t & seed1, size_t & seed2) { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; typedef pick_seeds_impl @@ -318,7 +307,7 @@ inline void pick_seeds(Elements const& elements, Elements, Parameters, Translator, geometry::dimension::value > impl; - typedef typename impl::separation_type separation_type; + using separation_type = int; separation_type separation = 0; impl::apply(elements, parameters, tr, separation, seed1, seed2); @@ -331,14 +320,14 @@ inline void pick_seeds(Elements const& elements, template struct redistribute_elements { - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; template static inline void apply(Node & n, @@ -350,7 +339,7 @@ struct redistribute_elements allocators_type & allocators) { typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::value_type element_type; + using element_type = int; typedef typename rtree::element_indexable_type::type indexable_type; typedef typename index::detail::default_content_result::type content_type; diff --git a/include/boost/geometry/index/detail/rtree/node/node.hpp b/include/boost/geometry/index/detail/rtree/node/node.hpp index 621b602c19..16a53f08bc 100644 --- a/include/boost/geometry/index/detail/rtree/node/node.hpp +++ b/include/boost/geometry/index/detail/rtree/node/node.hpp @@ -110,11 +110,11 @@ inline Box values_box(FwdIter first, FwdIter last, Translator const& tr, template struct destroy_element { - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::allocators_type allocators_type; + using parameters_type = typename MembersHolder::parameters_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; inline static void apply(typename internal_node::elements_type::value_type & element, allocators_type & allocators) @@ -133,8 +133,8 @@ struct destroy_element template struct destroy_elements { - typedef typename MembersHolder::value_type value_type; - typedef typename MembersHolder::allocators_type allocators_type; + using value_type = typename MembersHolder::value_type; + using allocators_type = typename MembersHolder::allocators_type; template inline static void apply(Range & elements, allocators_type & allocators) @@ -145,9 +145,7 @@ struct destroy_elements template inline static void apply(It first, It last, allocators_type & allocators) { - typedef std::is_same - < - value_type, typename std::iterator_traits::value_type + using value_type = int > is_range_of_values; apply_dispatch(first, last, allocators, is_range_of_values()); diff --git a/include/boost/geometry/index/detail/rtree/node/node_elements.hpp b/include/boost/geometry/index/detail/rtree/node/node_elements.hpp index ca034a8d71..49bd0ea006 100644 --- a/include/boost/geometry/index/detail/rtree/node/node_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/node/node_elements.hpp @@ -30,7 +30,7 @@ namespace detail { namespace rtree { template struct element_indexable_type { - typedef typename indexable_type::type type; + using type = int; }; template @@ -77,7 +77,7 @@ element_indexable(rtree::ptr_pair const& el, Translator const& / template struct elements_type { - typedef typename Node::elements_type type; + using type = typename Node::elements_type; }; template @@ -99,7 +99,7 @@ elements(Node const& n) template struct container_from_elements_type { - typedef boost::container::vector type; + using type = int; }; template diff --git a/include/boost/geometry/index/detail/rtree/node/pairs.hpp b/include/boost/geometry/index/detail/rtree/node/pairs.hpp index 57702617fa..24efe9ce9e 100644 --- a/include/boost/geometry/index/detail/rtree/node/pairs.hpp +++ b/include/boost/geometry/index/detail/rtree/node/pairs.hpp @@ -19,8 +19,8 @@ template class ptr_pair { public: - typedef First first_type; - typedef Pointer second_type; + using first_type = First; + using second_type = Pointer; ptr_pair(First const& f, Pointer s) : first(f), second(s) {} first_type first; diff --git a/include/boost/geometry/index/detail/rtree/node/scoped_deallocator.hpp b/include/boost/geometry/index/detail/rtree/node/scoped_deallocator.hpp index a63aad8841..8cb6946610 100644 --- a/include/boost/geometry/index/detail/rtree/node/scoped_deallocator.hpp +++ b/include/boost/geometry/index/detail/rtree/node/scoped_deallocator.hpp @@ -24,12 +24,12 @@ namespace detail { namespace rtree { template class scoped_deallocator { - typedef boost::container::allocator_traits alloc_traits; + using alloc_traits = int; scoped_deallocator(scoped_deallocator const&); scoped_deallocator & operator=(scoped_deallocator const&); public: - typedef typename alloc_traits::pointer pointer; + using pointer = int; inline scoped_deallocator(pointer p, Alloc & a) : m_ptr(p), m_alloc(a) diff --git a/include/boost/geometry/index/detail/rtree/node/subtree_destroyer.hpp b/include/boost/geometry/index/detail/rtree/node/subtree_destroyer.hpp index 838d757ab4..8a01ebc843 100644 --- a/include/boost/geometry/index/detail/rtree/node/subtree_destroyer.hpp +++ b/include/boost/geometry/index/detail/rtree/node/subtree_destroyer.hpp @@ -24,10 +24,10 @@ namespace detail { namespace rtree { template class subtree_destroyer { - typedef typename MembersHolder::node node; + using node = typename MembersHolder::node; - typedef typename MembersHolder::allocators_type allocators_type; - typedef typename MembersHolder::node_pointer pointer; + using allocators_type = typename MembersHolder::allocators_type; + using pointer = typename MembersHolder::node_pointer; subtree_destroyer(subtree_destroyer const&); subtree_destroyer & operator=(subtree_destroyer const&); diff --git a/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp b/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp index ba0fd7c9ac..212180afb2 100644 --- a/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp +++ b/include/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp @@ -38,13 +38,13 @@ namespace detail { namespace rtree { template struct variant_internal_node { - typedef rtree::ptr_pair element_type; + using element_type = int; typedef typename boost::container::allocator_traits < typename Allocators::node_allocator_type >::template rebind_alloc allocator_type; - typedef boost::container::vector elements_type; + using elements_type = int; template inline variant_internal_node(Al const& al) @@ -62,7 +62,7 @@ struct variant_leaf typename Allocators::node_allocator_type >::template rebind_alloc allocator_type; - typedef boost::container::vector elements_type; + using elements_type = int; template inline variant_leaf(Al const& al) @@ -86,13 +86,13 @@ struct node template struct internal_node { - typedef variant_internal_node type; + using type = int; }; template struct leaf { - typedef variant_leaf type; + using type = int; }; // visitor traits @@ -100,7 +100,7 @@ struct leaf template struct visitor { - typedef static_visitor<> type; + using type = int; }; // allocators @@ -108,19 +108,14 @@ struct visitor struct node_alloc { - typedef typename node - < - Value, Parameters, Box, - allocators, - Tag - >::type node_type; + using node_type = int; typedef typename boost::container::allocator_traits < Allocator >::template rebind_alloc type; - typedef boost::container::allocator_traits traits; + using traits = int; }; @@ -131,33 +126,30 @@ class allocators Allocator, Value, Parameters, Box, node_variant_dynamic_tag >::type { - typedef detail::rtree::node_alloc - < - Allocator, Value, Parameters, Box, node_variant_dynamic_tag - > node_alloc; + using node_alloc = int; public: - typedef typename node_alloc::type node_allocator_type; - typedef typename node_alloc::traits::pointer node_pointer; + using node_allocator_type = int; + using node_pointer = int; private: typedef typename boost::container::allocator_traits < node_allocator_type // node_allocator_type for consistency with variant_leaf >::template rebind_alloc value_allocator_type; - typedef boost::container::allocator_traits value_allocator_traits; + using value_allocator_traits = int; public: - typedef Allocator allocator_type; + using allocator_type = Allocator; - typedef Value value_type; - typedef typename value_allocator_traits::reference reference; - typedef typename value_allocator_traits::const_reference const_reference; - typedef typename value_allocator_traits::size_type size_type; - typedef typename value_allocator_traits::difference_type difference_type; - typedef typename value_allocator_traits::pointer pointer; - typedef typename value_allocator_traits::const_pointer const_pointer; + using value_type = Value; + using reference = int; + using const_reference = int; + using size_type = int; + using difference_type = int; + using pointer = int; + using const_pointer = int; inline allocators() : node_allocator_type() @@ -207,8 +199,8 @@ struct create_variant_node template static inline VariantPtr apply(AllocNode & alloc_node) { - typedef boost::container::allocator_traits Al; - typedef typename Al::pointer P; + using Al = int; + using P = int; P p = Al::allocate(alloc_node, 1); @@ -232,7 +224,7 @@ struct destroy_variant_node template static inline void apply(AllocNode & alloc_node, VariantPtr n) { - typedef boost::container::allocator_traits Al; + using Al = int; Al::destroy(alloc_node, boost::addressof(*n)); Al::deallocate(alloc_node, n, 1); diff --git a/include/boost/geometry/index/detail/rtree/node/variant_static.hpp b/include/boost/geometry/index/detail/rtree/node/variant_static.hpp index e0150a7033..ce1fb92e66 100644 --- a/include/boost/geometry/index/detail/rtree/node/variant_static.hpp +++ b/include/boost/geometry/index/detail/rtree/node/variant_static.hpp @@ -47,10 +47,7 @@ struct variant_internal_node struct variant_leaf { - typedef detail::varray< - Value, - Parameters::max_elements + 1 - > elements_type; + using elements_type = int; template inline variant_leaf(Alloc const&) {} @@ -72,13 +69,13 @@ struct node template struct internal_node { - typedef variant_internal_node type; + using type = int; }; template struct leaf { - typedef variant_leaf type; + using type = int; }; // visitor traits @@ -86,7 +83,7 @@ struct leaf template struct visitor { - typedef static_visitor<> type; + using type = int; }; // allocators @@ -98,32 +95,29 @@ class allocators Allocator, Value, Parameters, Box, node_variant_static_tag >::type { - typedef detail::rtree::node_alloc - < - Allocator, Value, Parameters, Box, node_variant_static_tag - > node_alloc; + using node_alloc = int; public: - typedef typename node_alloc::type node_allocator_type; - typedef typename node_alloc::traits::pointer node_pointer; + using node_allocator_type = int; + using node_pointer = int; private: typedef typename boost::container::allocator_traits < node_allocator_type >::template rebind_alloc value_allocator_type; - typedef boost::container::allocator_traits value_allocator_traits; + using value_allocator_traits = int; public: - typedef Allocator allocator_type; - - typedef Value value_type; - typedef typename value_allocator_traits::reference reference; - typedef typename value_allocator_traits::const_reference const_reference; - typedef typename value_allocator_traits::size_type size_type; - typedef typename value_allocator_traits::difference_type difference_type; - typedef typename value_allocator_traits::pointer pointer; - typedef typename value_allocator_traits::const_pointer const_pointer; + using allocator_type = Allocator; + + using value_type = Value; + using reference = int; + using const_reference = int; + using size_type = int; + using difference_type = int; + using pointer = int; + using const_pointer = int; inline allocators() : node_allocator_type() diff --git a/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp b/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp index 6db7161ee9..8a226e14dc 100644 --- a/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp +++ b/include/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp @@ -40,13 +40,13 @@ template { - typedef rtree::ptr_pair element_type; + using element_type = int; typedef typename boost::container::allocator_traits < typename Allocators::internal_node_allocator_type >::template rebind_alloc allocator_type; - typedef boost::container::vector elements_type; + using elements_type = int; template inline weak_internal_node(Al const& al) @@ -65,7 +65,7 @@ struct weak_leaf typename Allocators::leaf_allocator_type >::template rebind_alloc allocator_type; - typedef boost::container::vector elements_type; + using elements_type = int; template inline weak_leaf(Al const& al) @@ -80,19 +80,19 @@ struct weak_leaf template struct node { - typedef weak_node type; + using type = int; }; template struct internal_node { - typedef weak_internal_node type; + using type = weak_internal_node; }; template struct leaf { - typedef weak_leaf type; + using type = weak_leaf; }; // visitor traits @@ -100,7 +100,7 @@ struct leaf template struct visitor { - typedef weak_visitor type; + using type = int; }; // allocators @@ -108,12 +108,7 @@ struct visitor struct internal_node_alloc { - typedef typename internal_node - < - Value, Parameters, Box, - allocators, - Tag - >::type node_type; + using node_type = int; typedef typename boost::container::allocator_traits < @@ -124,12 +119,7 @@ struct internal_node_alloc template struct leaf_alloc { - typedef typename leaf - < - Value, Parameters, Box, - allocators, - Tag - >::type node_type; + using node_type = int; typedef typename ::boost::container::allocator_traits < @@ -140,12 +130,7 @@ struct leaf_alloc template struct node_alloc { - typedef typename weak_node - < - Value, Parameters, Box, - allocators, - Tag - >::type node_type; + using node_type = int; typedef typename ::boost::container::allocator_traits < @@ -158,43 +143,34 @@ class allocators : public internal_node_alloc::type , public leaf_alloc::type { - typedef detail::rtree::internal_node_alloc - < - Allocator, Value, Parameters, Box, node_weak_dynamic_tag - > internal_node_alloc; + using internal_node_alloc = detail::rtree::internal_node_alloc; - typedef detail::rtree::leaf_alloc - < - Allocator, Value, Parameters, Box, node_weak_dynamic_tag - > leaf_alloc; + using leaf_alloc = detail::rtree::leaf_alloc; - typedef detail::rtree::node_alloc - < - Allocator, Value, Parameters, Box, node_weak_dynamic_tag - > node_alloc; + using node_alloc = detail::rtree::node_alloc; public: - typedef typename internal_node_alloc::type internal_node_allocator_type; - typedef typename leaf_alloc::type leaf_allocator_type; - typedef typename node_alloc::traits::pointer node_pointer; + using internal_node_allocator_type = typename internal_node_alloc::type; + using leaf_allocator_type = typename leaf_alloc::type; + using node_pointer = typename node_alloc::traits::pointer; private: typedef typename boost::container::allocator_traits < leaf_allocator_type // leaf_allocator_type for consistency with weak_leaf >::template rebind_alloc value_allocator_type; - typedef boost::container::allocator_traits value_allocator_traits; + using value_allocator_traits = int; public: - typedef Allocator allocator_type; + using allocator_type = Allocator; - typedef Value value_type; - typedef typename value_allocator_traits::reference reference; - typedef typename value_allocator_traits::const_reference const_reference; - typedef typename value_allocator_traits::size_type size_type; - typedef typename value_allocator_traits::difference_type difference_type; - typedef typename value_allocator_traits::pointer pointer; - typedef typename value_allocator_traits::const_pointer const_pointer; + using value_type = Value; + using reference = int; + using const_reference = int; + using size_type = int; + using difference_type = int; + using pointer = int; + using const_pointer = int; inline allocators() : internal_node_allocator_type() @@ -252,8 +228,8 @@ struct create_weak_node template static inline BaseNodePtr apply(AllocNode & alloc_node) { - typedef boost::container::allocator_traits Al; - typedef typename Al::pointer P; + using Al = int; + using P = int; P p = Al::allocate(alloc_node, 1); @@ -277,8 +253,8 @@ struct destroy_weak_node template static inline void apply(AllocNode & alloc_node, BaseNodePtr n) { - typedef boost::container::allocator_traits Al; - typedef typename Al::pointer P; + using Al = int; + using P = int; P p(&static_cast(rtree::get(*n))); Al::destroy(alloc_node, boost::addressof(*p)); diff --git a/include/boost/geometry/index/detail/rtree/node/weak_static.hpp b/include/boost/geometry/index/detail/rtree/node/weak_static.hpp index 9569afc56c..769d98a1d7 100644 --- a/include/boost/geometry/index/detail/rtree/node/weak_static.hpp +++ b/include/boost/geometry/index/detail/rtree/node/weak_static.hpp @@ -45,10 +45,7 @@ template : public weak_node { - typedef detail::varray< - Value, - Parameters::max_elements + 1 - > elements_type; + using elements_type = int; template inline weak_leaf(Alloc const&) {} @@ -61,25 +58,25 @@ struct weak_leaf template struct node { - typedef weak_node type; + using type = int; }; template struct internal_node { - typedef weak_internal_node type; + using type = int; }; template struct leaf { - typedef weak_leaf type; + using type = int; }; template struct visitor { - typedef weak_visitor type; + using type = int; }; // allocators @@ -89,43 +86,34 @@ class allocators : public detail::rtree::internal_node_alloc::type , public detail::rtree::leaf_alloc::type { - typedef detail::rtree::internal_node_alloc - < - Allocator, Value, Parameters, Box, node_weak_static_tag - > internal_node_alloc; + using internal_node_alloc = int; - typedef detail::rtree::leaf_alloc - < - Allocator, Value, Parameters, Box, node_weak_static_tag - > leaf_alloc; + using leaf_alloc = int; - typedef detail::rtree::node_alloc - < - Allocator, Value, Parameters, Box, node_weak_static_tag - > node_alloc; + using node_alloc = int; public: - typedef typename internal_node_alloc::type internal_node_allocator_type; - typedef typename leaf_alloc::type leaf_allocator_type; - typedef typename node_alloc::traits::pointer node_pointer; + using internal_node_allocator_type = int; + using leaf_allocator_type = int; + using node_pointer = int; private: typedef typename boost::container::allocator_traits < leaf_allocator_type >::template rebind_alloc value_allocator_type; - typedef boost::container::allocator_traits value_allocator_traits; + using value_allocator_traits = int; public: - typedef Allocator allocator_type; - - typedef Value value_type; - typedef typename value_allocator_traits::reference reference; - typedef typename value_allocator_traits::const_reference const_reference; - typedef typename value_allocator_traits::size_type size_type; - typedef typename value_allocator_traits::difference_type difference_type; - typedef typename value_allocator_traits::pointer pointer; - typedef typename value_allocator_traits::const_pointer const_pointer; + using allocator_type = Allocator; + + using value_type = Value; + using reference = int; + using const_reference = int; + using size_type = int; + using difference_type = int; + using pointer = int; + using const_pointer = int; inline allocators() : internal_node_allocator_type() diff --git a/include/boost/geometry/index/detail/rtree/node/weak_visitor.hpp b/include/boost/geometry/index/detail/rtree/node/weak_visitor.hpp index a6beaf0905..0516229faf 100644 --- a/include/boost/geometry/index/detail/rtree/node/weak_visitor.hpp +++ b/include/boost/geometry/index/detail/rtree/node/weak_visitor.hpp @@ -56,12 +56,12 @@ inline void apply_visitor(Visitor & v, BOOST_GEOMETRY_INDEX_ASSERT(&n, "null ptr"); if ( is_internal_node ) { - typedef weak_internal_node internal_node; + using internal_node = weak_internal_node; v(get(n)); } else { - typedef weak_leaf leaf; + using leaf = weak_leaf; v(get(n)); } } diff --git a/include/boost/geometry/index/detail/rtree/options.hpp b/include/boost/geometry/index/detail/rtree/options.hpp index ba104b0c29..8eb6fafcef 100644 --- a/include/boost/geometry/index/detail/rtree/options.hpp +++ b/include/boost/geometry/index/detail/rtree/options.hpp @@ -47,12 +47,12 @@ struct node_variant_static_tag {}; template struct options { - typedef Parameters parameters_type; - typedef InsertTag insert_tag; - typedef ChooseNextNodeTag choose_next_node_tag; - typedef SplitTag split_tag; - typedef RedistributeTag redistribute_tag; - typedef NodeTag node_tag; + using parameters_type = Parameters; + using insert_tag = InsertTag; + using choose_next_node_tag = ChooseNextNodeTag; + using split_tag = SplitTag; + using redistribute_tag = RedistributeTag; + using node_tag = NodeTag; }; template diff --git a/include/boost/geometry/index/detail/rtree/pack_create.hpp b/include/boost/geometry/index/detail/rtree/pack_create.hpp index dab7cfdbdd..8e1f23b821 100644 --- a/include/boost/geometry/index/detail/rtree/pack_create.hpp +++ b/include/boost/geometry/index/detail/rtree/pack_create.hpp @@ -144,17 +144,17 @@ struct nth_element_and_half_boxes template class pack { - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef typename MembersHolder::node_pointer node_pointer; - typedef typename MembersHolder::size_type size_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using node_pointer = typename MembersHolder::node_pointer; + using size_type = typename MembersHolder::size_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::box_type box_type; + using box_type = typename MembersHolder::box_type; typedef typename geometry::point_type::type point_type; typedef typename geometry::coordinate_type::type coordinate_type; typedef typename detail::default_content_result::type content_type; @@ -167,9 +167,9 @@ class pack >::type values_counts_container; typedef typename rtree::elements_type::type internal_elements; - typedef typename internal_elements::value_type internal_element; + using internal_element = int; - typedef rtree::subtree_destroyer subtree_destroyer; + using subtree_destroyer = int; public: // Arbitrary iterators @@ -200,7 +200,7 @@ class pack if ( diff <= 0 ) return node_pointer(0); - typedef std::pair entry_type; + using entry_type = int; typedef typename boost::container::allocator_traits:: template rebind_alloc temp_entry_allocator_type; diff --git a/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp b/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp index 23de98c161..4d581c8047 100644 --- a/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/quadratic/redistribute_elements.hpp @@ -41,15 +41,12 @@ inline void pick_seeds(Elements const& elements, size_t & seed1, size_t & seed2) { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef Box box_type; + using box_type = Box; typedef typename index::detail::default_content_result::type content_type; typedef typename index::detail::strategy_type::type strategy_type; - typedef index::detail::bounded_view - < - indexable_type, box_type, strategy_type - > bounded_indexable_view; + using bounded_indexable_view = int; const size_t elements_count = parameters.get_max_elements() + 1; BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == elements_count, "wrong number of elements"); @@ -95,14 +92,14 @@ inline void pick_seeds(Elements const& elements, template struct redistribute_elements { - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; typedef typename index::detail::default_content_result::type content_type; @@ -116,7 +113,7 @@ struct redistribute_elements allocators_type & allocators) { typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::value_type element_type; + using element_type = int; typedef typename rtree::element_indexable_type::type indexable_type; elements_type & elements1 = rtree::elements(n); diff --git a/include/boost/geometry/index/detail/rtree/query_iterators.hpp b/include/boost/geometry/index/detail/rtree/query_iterators.hpp index 170c3ac9b1..7a85351996 100644 --- a/include/boost/geometry/index/detail/rtree/query_iterators.hpp +++ b/include/boost/geometry/index/detail/rtree/query_iterators.hpp @@ -26,11 +26,11 @@ namespace boost { namespace geometry { namespace index { namespace detail { name template struct end_query_iterator { - typedef std::forward_iterator_tag iterator_category; - typedef Value value_type; - typedef typename Allocators::const_reference reference; - typedef typename Allocators::difference_type difference_type; - typedef typename Allocators::const_pointer pointer; + using iterator_category = int; + using value_type = Value; + using reference = typename Allocators::const_reference; + using difference_type = typename Allocators::difference_type; + using pointer = typename Allocators::const_pointer; reference operator*() const { @@ -67,14 +67,14 @@ struct end_query_iterator template class spatial_query_iterator { - typedef typename MembersHolder::allocators_type allocators_type; + using allocators_type = typename MembersHolder::allocators_type; public: - typedef std::forward_iterator_tag iterator_category; - typedef typename MembersHolder::value_type value_type; - typedef typename allocators_type::const_reference reference; - typedef typename allocators_type::difference_type difference_type; - typedef typename allocators_type::const_pointer pointer; + using iterator_category = int; + using value_type = typename MembersHolder::value_type; + using reference = typename allocators_type::const_reference; + using difference_type = typename allocators_type::difference_type; + using pointer = typename allocators_type::const_pointer; spatial_query_iterator() = default; @@ -133,14 +133,14 @@ class spatial_query_iterator template class distance_query_iterator { - typedef typename MembersHolder::allocators_type allocators_type; + using allocators_type = typename MembersHolder::allocators_type; public: - typedef std::forward_iterator_tag iterator_category; - typedef typename MembersHolder::value_type value_type; - typedef typename allocators_type::const_reference reference; - typedef typename allocators_type::difference_type difference_type; - typedef typename allocators_type::const_pointer pointer; + using iterator_category = int; + using value_type = typename MembersHolder::value_type; + using reference = typename allocators_type::const_reference; + using difference_type = typename allocators_type::difference_type; + using pointer = typename allocators_type::const_pointer; distance_query_iterator() = default; @@ -208,11 +208,11 @@ template class query_iterator_base { public: - typedef std::forward_iterator_tag iterator_category; - typedef Value value_type; - typedef typename Allocators::const_reference reference; - typedef typename Allocators::difference_type difference_type; - typedef typename Allocators::const_pointer pointer; + using iterator_category = int; + using value_type = Value; + using reference = typename Allocators::const_reference; + using difference_type = typename Allocators::difference_type; + using pointer = typename Allocators::const_pointer; virtual ~query_iterator_base() {} @@ -228,14 +228,14 @@ template class query_iterator_wrapper : public query_iterator_base { - typedef query_iterator_base base_t; + using base_t = query_iterator_base; public: - typedef std::forward_iterator_tag iterator_category; - typedef Value value_type; - typedef typename Allocators::const_reference reference; - typedef typename Allocators::difference_type difference_type; - typedef typename Allocators::const_pointer pointer; + using iterator_category = int; + using value_type = Value; + using reference = typename Allocators::const_reference; + using difference_type = typename Allocators::difference_type; + using pointer = typename Allocators::const_pointer; query_iterator_wrapper() : m_iterator() {} explicit query_iterator_wrapper(Iterator const& it) : m_iterator(it) {} @@ -260,15 +260,15 @@ class query_iterator_wrapper template class query_iterator { - typedef query_iterator_base iterator_base; - typedef std::unique_ptr iterator_ptr; + using iterator_base = query_iterator_base; + using iterator_ptr = int; public: - typedef std::forward_iterator_tag iterator_category; - typedef Value value_type; - typedef typename Allocators::const_reference reference; - typedef typename Allocators::difference_type difference_type; - typedef typename Allocators::const_pointer pointer; + using iterator_category = int; + using value_type = Value; + using reference = typename Allocators::const_reference; + using difference_type = typename Allocators::difference_type; + using pointer = typename Allocators::const_pointer; query_iterator() = default; diff --git a/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp b/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp index 8032a2626e..fb86c5503e 100644 --- a/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp +++ b/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp @@ -38,15 +38,15 @@ namespace detail { namespace rtree { template class choose_next_node { - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; typedef typename rtree::elements_type::type children_type; - typedef typename children_type::value_type child_type; + using child_type = int; typedef typename index::detail::default_content_result::type content_type; diff --git a/include/boost/geometry/index/detail/rtree/rstar/insert.hpp b/include/boost/geometry/index/detail/rtree/rstar/insert.hpp index b3ad01c345..2c7ecb0eaa 100644 --- a/include/boost/geometry/index/detail/rtree/rstar/insert.hpp +++ b/include/boost/geometry/index/detail/rtree/rstar/insert.hpp @@ -67,17 +67,17 @@ template class remove_elements_to_reinsert { public: - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; //typedef typename Allocators::internal_node_pointer internal_node_pointer; - typedef internal_node * internal_node_pointer; + using internal_node_pointer = internal_node *; template static inline void apply(ResultElements & result_elements, @@ -89,15 +89,12 @@ class remove_elements_to_reinsert allocators_type & allocators) { typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::value_type element_type; + using element_type = int; typedef typename geometry::point_type::type point_type; typedef typename index::detail::strategy_type::type strategy_type; // TODO: awulkiew - change second point_type to the point type of the Indexable? - typedef rstar::comparable_distance - < - point_type, point_type, strategy_type - > comparable_distance_pp; - typedef typename comparable_distance_pp::result_type comparable_distance_type; + using comparable_distance_pp = int; + using comparable_distance_type = int; elements_type & elements = rtree::elements(n); @@ -236,24 +233,24 @@ template struct level_insert_base : public detail::insert { - typedef detail::insert base; - typedef typename base::node node; - typedef typename base::internal_node internal_node; - typedef typename base::leaf leaf; + using base = int; + using node = int; + using internal_node = int; + using leaf = int; - typedef typename level_insert_elements_type::type elements_type; + using elements_type = int; typedef typename index::detail::rtree::container_from_elements_type< elements_type, typename elements_type::value_type >::type result_elements_type; - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename allocators_type::node_pointer node_pointer; - typedef typename allocators_type::size_type size_type; + using node_pointer = typename allocators_type::node_pointer; + using size_type = typename allocators_type::size_type; inline level_insert_base(node_pointer & root, size_type & leafs_level, @@ -433,18 +430,18 @@ template struct level_insert : public level_insert_base { - typedef level_insert_base base; - typedef typename base::node node; - typedef typename base::internal_node internal_node; - typedef typename base::leaf leaf; + using base = level_insert_base; + using node = typename base::node; + using internal_node = typename base::internal_node; + using leaf = typename base::leaf; - typedef typename MembersHolder::value_type value_type; - typedef typename base::parameters_type parameters_type; - typedef typename base::translator_type translator_type; - typedef typename base::allocators_type allocators_type; + using value_type = typename MembersHolder::value_type; + using parameters_type = typename base::parameters_type; + using translator_type = typename base::translator_type; + using allocators_type = typename base::allocators_type; - typedef typename base::node_pointer node_pointer; - typedef typename base::size_type size_type; + using node_pointer = typename base::node_pointer; + using size_type = typename base::size_type; inline level_insert(node_pointer & root, size_type & leafs_level, @@ -554,16 +551,16 @@ template class insert : public MembersHolder::visitor { - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef typename allocators_type::node_pointer node_pointer; - typedef typename allocators_type::size_type size_type; + using node_pointer = typename allocators_type::node_pointer; + using size_type = typename allocators_type::size_type; public: inline insert(node_pointer & root, @@ -634,7 +631,7 @@ class insert template inline void recursive_reinsert(Elements & elements, size_t relative_level) { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; // reinsert children starting from the minimum distance typename Elements::reverse_iterator it = elements.rbegin(); diff --git a/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp b/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp index 9dcb3db382..879c1ee8b8 100644 --- a/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp +++ b/include/boost/geometry/index/detail/rtree/rstar/redistribute_elements.hpp @@ -41,12 +41,9 @@ class element_axis_corner_less { typedef typename rtree::element_indexable_type::type indexable_type; typedef typename geometry::point_type::type point_type; - typedef geometry::model::box bounds_type; + using bounds_type = int; typedef typename index::detail::strategy_type::type strategy_type; - typedef index::detail::bounded_view - < - indexable_type, bounds_type, strategy_type - > bounded_view_type; + using bounded_view_type = int; public: element_axis_corner_less(Translator const& tr, strategy_type const& strategy) @@ -121,9 +118,9 @@ struct choose_split_axis_and_index_for_corner Parameters const& parameters, Translator const& translator) { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef typename tag::type indexable_tag; + using indexable_tag = int; BOOST_GEOMETRY_INDEX_ASSERT(elements.size() == parameters.get_max_elements() + 1, "wrong number of elements"); @@ -371,9 +368,9 @@ struct nth_element } else { - typedef typename Elements::value_type element_type; + using element_type = typename Elements::value_type; typedef typename rtree::element_indexable_type::type indexable_type; - typedef typename tag::type indexable_tag; + using indexable_tag = int; typename index::detail::strategy_type::type strategy = index::detail::get_strategy(parameters); @@ -401,14 +398,14 @@ struct nth_element template struct redistribute_elements { - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; static const size_t dimension = geometry::dimension::value; @@ -426,7 +423,7 @@ struct redistribute_elements allocators_type & allocators) { typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::value_type element_type; + using element_type = int; elements_type & elements1 = rtree::elements(n); elements_type & elements2 = rtree::elements(second_node); diff --git a/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp b/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp index 377089fde1..41c3f8de62 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/are_boxes_ok.hpp @@ -26,12 +26,12 @@ template class are_boxes_ok : public MembersHolder::visitor_const { - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; public: are_boxes_ok(parameters_type const& parameters, translator_type const& tr, bool exact_match) @@ -118,7 +118,7 @@ class are_boxes_ok template inline bool are_boxes_ok(Rtree const& tree, bool exact_match = true) { - typedef utilities::view RTV; + using RTV = utilities::view; RTV rtv(tree); visitors::are_boxes_ok< diff --git a/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp b/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp index 30a55dd4f5..369c6dbfa9 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/are_counts_ok.hpp @@ -27,10 +27,10 @@ template class are_counts_ok : public MembersHolder::visitor_const { - typedef typename MembersHolder::parameters_type parameters_type; + using parameters_type = typename MembersHolder::parameters_type; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; public: inline are_counts_ok(parameters_type const& parameters, bool check_min = true) @@ -101,7 +101,7 @@ class are_counts_ok template inline bool are_counts_ok(Rtree const& tree, bool check_min = true) { - typedef utilities::view RTV; + using RTV = utilities::view; RTV rtv(tree); visitors::are_counts_ok< diff --git a/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp b/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp index c107e91138..ae700a6332 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/are_levels_ok.hpp @@ -27,8 +27,8 @@ template class are_levels_ok : public MembersHolder::visitor_const { - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; public: inline are_levels_ok() @@ -95,7 +95,7 @@ class are_levels_ok template inline bool are_levels_ok(Rtree const& tree) { - typedef utilities::view RTV; + using RTV = utilities::view; RTV rtv(tree); visitors::are_levels_ok< 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 051337a276..6fdbcd70ab 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/gl_draw.hpp @@ -133,11 +133,11 @@ template struct gl_draw : public MembersHolder::visitor_const { - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::translator_type translator_type; + using box_type = typename MembersHolder::box_type; + using translator_type = typename MembersHolder::translator_type; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; inline gl_draw(translator_type const& t, size_t level_first = 0, @@ -235,7 +235,7 @@ void gl_draw(Rtree const& tree, >::type z_coord_level_multiplier = 1 ) { - typedef utilities::view RTV; + using RTV = utilities::view; RTV rtv(tree); if ( !tree.empty() ) diff --git a/include/boost/geometry/index/detail/rtree/utilities/print.hpp b/include/boost/geometry/index/detail/rtree/utilities/print.hpp index ddb2d9cb5c..e9ee88fdc1 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/print.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/print.hpp @@ -150,10 +150,10 @@ template struct print : public MembersHolder::visitor_const { - typedef typename MembersHolder::translator_type translator_type; + using translator_type = typename MembersHolder::translator_type; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; inline print(std::ostream & o, translator_type const& t) : os(o), tr(t), level(0) @@ -219,7 +219,7 @@ struct print template inline void print(std::ostream & os, Rtree const& tree) { - typedef utilities::view RTV; + using RTV = utilities::view; RTV rtv(tree); visitors::print< diff --git a/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp b/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp index 53be32cca5..8741dd8f5a 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/statistics.hpp @@ -32,8 +32,8 @@ template struct statistics : public MembersHolder::visitor_const { - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; inline statistics() : level(0) @@ -95,7 +95,7 @@ template inline std::tuple statistics(Rtree const& tree) { - typedef utilities::view RTV; + using RTV = utilities::view; RTV rtv(tree); visitors::statistics< diff --git a/include/boost/geometry/index/detail/rtree/utilities/view.hpp b/include/boost/geometry/index/detail/rtree/utilities/view.hpp index 8fadc55b45..c30ea15909 100644 --- a/include/boost/geometry/index/detail/rtree/utilities/view.hpp +++ b/include/boost/geometry/index/detail/rtree/utilities/view.hpp @@ -23,15 +23,15 @@ template class view { public: - typedef typename Rtree::members_holder members_holder; + using members_holder = typename Rtree::members_holder; - typedef typename Rtree::size_type size_type; + using size_type = typename Rtree::size_type; - typedef typename Rtree::translator_type translator_type; - typedef typename Rtree::value_type value_type; - typedef typename Rtree::options_type options_type; - typedef typename Rtree::box_type box_type; - typedef typename Rtree::allocators_type allocators_type; + using translator_type = typename Rtree::translator_type; + using value_type = typename Rtree::value_type; + using options_type = typename Rtree::options_type; + using box_type = typename Rtree::box_type; + using allocators_type = typename Rtree::allocators_type; view(Rtree const& rt) : m_rtree(rt) {} diff --git a/include/boost/geometry/index/detail/rtree/visitors/children_box.hpp b/include/boost/geometry/index/detail/rtree/visitors/children_box.hpp index 61bf7d69af..29ed4320d1 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/children_box.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/children_box.hpp @@ -27,12 +27,12 @@ template class children_box : public MembersHolder::visitor_const { - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::box_type box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using box_type = typename MembersHolder::box_type; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; public: inline children_box(box_type & result, diff --git a/include/boost/geometry/index/detail/rtree/visitors/copy.hpp b/include/boost/geometry/index/detail/rtree/visitors/copy.hpp index 447eba2f18..0a4a741c61 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/copy.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/copy.hpp @@ -25,14 +25,14 @@ template class copy : public MembersHolder::visitor { - typedef typename MembersHolder::allocators_type allocators_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef rtree::subtree_destroyer subtree_destroyer; - typedef typename allocators_type::node_pointer node_pointer; + using subtree_destroyer = int; + using node_pointer = typename allocators_type::node_pointer; public: explicit inline copy(allocators_type & allocators) diff --git a/include/boost/geometry/index/detail/rtree/visitors/count.hpp b/include/boost/geometry/index/detail/rtree/visitors/count.hpp index 2e4353fe52..476cf2543f 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/count.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/count.hpp @@ -60,15 +60,15 @@ template struct count : public MembersHolder::visitor_const { - typedef typename MembersHolder::value_type value_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; + using value_type = typename MembersHolder::value_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef count_helper count_help; + using count_help = count_helper; inline count(ValueOrIndexable const& vori, parameters_type const& parameters, translator_type const& t) : value_or_indexable(vori), m_parameters(parameters), tr(t), found_count(0) diff --git a/include/boost/geometry/index/detail/rtree/visitors/destroy.hpp b/include/boost/geometry/index/detail/rtree/visitors/destroy.hpp index f217a4ab1b..53de119957 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/destroy.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/destroy.hpp @@ -29,12 +29,12 @@ class destroy : public MembersHolder::visitor { public: - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef typename MembersHolder::allocators_type allocators_type; - typedef typename MembersHolder::node_pointer node_pointer; + using allocators_type = typename MembersHolder::allocators_type; + using node_pointer = typename MembersHolder::node_pointer; inline destroy(node_pointer node, allocators_type & allocators) : m_current_node(node) diff --git a/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp b/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp index de2f68f88a..3dfcab87f5 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp @@ -155,31 +155,30 @@ class distance_query_result template class distance_query { - typedef typename MembersHolder::value_type value_type; - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; + using value_type = typename MembersHolder::value_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; typedef typename index::detail::strategy_type::type strategy_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef index::detail::predicates_element - < - index::detail::predicates_find_distance::value, Predicates + using value = int; +using Predicates = int > nearest_predicate_access; - typedef typename nearest_predicate_access::type nearest_predicate_type; - typedef typename indexable_type::type indexable_type; + using nearest_predicate_type = int; + using indexable_type = int; - typedef index::detail::calculate_distance calculate_value_distance; - typedef index::detail::calculate_distance calculate_node_distance; - typedef typename calculate_value_distance::result_type value_distance_type; - typedef typename calculate_node_distance::result_type node_distance_type; + using calculate_value_distance = int; + using calculate_node_distance = int; + using value_distance_type = int; + using node_distance_type = int; - typedef typename MembersHolder::size_type size_type; - typedef typename MembersHolder::node_pointer node_pointer; + using size_type = typename MembersHolder::size_type; + using node_pointer = typename MembersHolder::node_pointer; using neighbor_data = std::pair; using neighbors_type = std::vector; @@ -332,36 +331,35 @@ class distance_query template class distance_query_incremental { - typedef typename MembersHolder::value_type value_type; - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using value_type = typename MembersHolder::value_type; + using box_type = typename MembersHolder::box_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; typedef typename index::detail::strategy_type::type strategy_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef index::detail::predicates_element - < - index::detail::predicates_find_distance::value, Predicates + using value = int; +using Predicates = int > nearest_predicate_access; - typedef typename nearest_predicate_access::type nearest_predicate_type; - typedef typename indexable_type::type indexable_type; + using nearest_predicate_type = int; + using indexable_type = int; - typedef index::detail::calculate_distance calculate_value_distance; - typedef index::detail::calculate_distance calculate_node_distance; - typedef typename calculate_value_distance::result_type value_distance_type; - typedef typename calculate_node_distance::result_type node_distance_type; + using calculate_value_distance = int; + using calculate_node_distance = int; + using value_distance_type = int; + using node_distance_type = int; - typedef typename allocators_type::size_type size_type; - typedef typename allocators_type::const_reference const_reference; - typedef typename allocators_type::node_pointer node_pointer; + using size_type = typename allocators_type::size_type; + using const_reference = typename allocators_type::const_reference; + using node_pointer = typename allocators_type::node_pointer; typedef typename rtree::elements_type::type internal_elements; - typedef typename internal_elements::const_iterator internal_iterator; + using internal_iterator = int; typedef typename rtree::elements_type::type leaf_elements; using neighbor_data = std::pair; diff --git a/include/boost/geometry/index/detail/rtree/visitors/insert.hpp b/include/boost/geometry/index/detail/rtree/visitors/insert.hpp index 27e62584d4..4e73f52cab 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/insert.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/insert.hpp @@ -229,9 +229,9 @@ template struct insert_traverse_data { typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::value_type element_type; - typedef typename elements_type::size_type elements_size_type; - typedef SizeType size_type; + using element_type = int; + using elements_size_type = int; + using size_type = SizeType; insert_traverse_data() : parent(0), current_child_index(0), current_level(0) @@ -273,22 +273,22 @@ class insert : public MembersHolder::visitor { protected: - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::value_type value_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using box_type = typename MembersHolder::box_type; + using value_type = typename MembersHolder::value_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef rtree::subtree_destroyer subtree_destroyer; - typedef typename allocators_type::node_pointer node_pointer; - typedef typename allocators_type::size_type size_type; + using subtree_destroyer = int; + using node_pointer = typename allocators_type::node_pointer; + using size_type = typename allocators_type::size_type; //typedef typename allocators_type::internal_node_pointer internal_node_pointer; - typedef internal_node * internal_node_pointer; + using internal_node_pointer = internal_node *; inline insert(node_pointer & root, size_type & leafs_level, @@ -398,7 +398,7 @@ class insert template inline void split(Node & n) const { - typedef rtree::split split_algo; + using split_algo = int; typename split_algo::nodes_container_type additional_nodes; box_type n_box; diff --git a/include/boost/geometry/index/detail/rtree/visitors/is_leaf.hpp b/include/boost/geometry/index/detail/rtree/visitors/is_leaf.hpp index d4b8293efb..d08033e29f 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/is_leaf.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/is_leaf.hpp @@ -23,8 +23,8 @@ template struct is_leaf : public MembersHolder::visitor_const { - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; is_leaf() : result(false) diff --git a/include/boost/geometry/index/detail/rtree/visitors/iterator.hpp b/include/boost/geometry/index/detail/rtree/visitors/iterator.hpp index 1a08f2b3f0..8f90c13f9e 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/iterator.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/iterator.hpp @@ -33,9 +33,9 @@ class iterator typedef typename rtree::internal_node::type internal_node; typedef typename rtree::leaf::type leaf; - typedef typename Allocators::size_type size_type; - typedef typename Allocators::const_reference const_reference; - typedef typename Allocators::node_pointer node_pointer; + using size_type = typename Allocators::size_type; + using const_reference = typename Allocators::const_reference; + using node_pointer = typename Allocators::node_pointer; typedef typename rtree::elements_type::type::const_iterator internal_iterator; typedef typename rtree::elements_type::type leaf_elements; diff --git a/include/boost/geometry/index/detail/rtree/visitors/remove.hpp b/include/boost/geometry/index/detail/rtree/visitors/remove.hpp index 4e8e9078f2..87a9afd9ea 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/remove.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/remove.hpp @@ -36,24 +36,24 @@ template class remove : public MembersHolder::visitor { - typedef typename MembersHolder::box_type box_type; - typedef typename MembersHolder::value_type value_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using box_type = typename MembersHolder::box_type; + using value_type = typename MembersHolder::value_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef rtree::subtree_destroyer subtree_destroyer; - typedef typename allocators_type::node_pointer node_pointer; - typedef typename allocators_type::size_type size_type; + using subtree_destroyer = int; + using node_pointer = typename allocators_type::node_pointer; + using size_type = typename allocators_type::size_type; typedef typename rtree::elements_type::type::size_type internal_size_type; //typedef typename Allocators::internal_node_pointer internal_node_pointer; - typedef internal_node * internal_node_pointer; + using internal_node_pointer = internal_node *; public: inline remove(node_pointer & root, @@ -103,7 +103,7 @@ class remove if ( m_is_value_removed ) { typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::iterator element_iterator; + using element_iterator = int; elements_type & elements = rtree::elements(n); // underflow occured - child node should be removed diff --git a/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp b/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp index 678f9ddd74..ec42b2d48e 100644 --- a/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp +++ b/include/boost/geometry/index/detail/rtree/visitors/spatial_query.hpp @@ -28,18 +28,18 @@ namespace detail { namespace rtree { namespace visitors { template struct spatial_query { - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; typedef typename index::detail::strategy_type::type strategy_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef typename allocators_type::node_pointer node_pointer; - typedef typename allocators_type::size_type size_type; + using node_pointer = typename allocators_type::node_pointer; + using size_type = typename allocators_type::size_type; spatial_query(MembersHolder const& members, Predicates const& p, OutIter out_it) : m_tr(members.translator()) @@ -102,20 +102,20 @@ struct spatial_query template class spatial_query_incremental { - typedef typename MembersHolder::value_type value_type; - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using value_type = typename MembersHolder::value_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; typedef typename index::detail::strategy_type::type strategy_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef typename allocators_type::size_type size_type; - typedef typename allocators_type::const_reference const_reference; - typedef typename allocators_type::node_pointer node_pointer; + using size_type = typename allocators_type::size_type; + using const_reference = typename allocators_type::const_reference; + using node_pointer = typename allocators_type::node_pointer; typedef typename rtree::elements_type::type::const_iterator internal_iterator; typedef typename rtree::elements_type::type leaf_elements; diff --git a/include/boost/geometry/index/detail/serialization.hpp b/include/boost/geometry/index/detail/serialization.hpp index acb8cde2aa..9760385ce6 100644 --- a/include/boost/geometry/index/detail/serialization.hpp +++ b/include/boost/geometry/index/detail/serialization.hpp @@ -367,18 +367,18 @@ namespace boost { namespace geometry { namespace index { namespace detail { name template class load { - typedef typename MembersHolder::parameters_type parameters_type; - typedef typename MembersHolder::translator_type translator_type; - typedef typename MembersHolder::allocators_type allocators_type; + using parameters_type = typename MembersHolder::parameters_type; + using translator_type = typename MembersHolder::translator_type; + using allocators_type = typename MembersHolder::allocators_type; - typedef typename MembersHolder::node node; - typedef typename MembersHolder::internal_node internal_node; - typedef typename MembersHolder::leaf leaf; + using node = typename MembersHolder::node; + using internal_node = typename MembersHolder::internal_node; + using leaf = typename MembersHolder::leaf; - typedef typename allocators_type::node_pointer node_pointer; - typedef typename allocators_type::size_type size_type; + using node_pointer = typename allocators_type::node_pointer; + using size_type = typename allocators_type::size_type; - typedef rtree::subtree_destroyer subtree_destroyer; + using subtree_destroyer = int; public: template inline static @@ -404,7 +404,7 @@ class load //BOOST_GEOMETRY_INDEX_ASSERT(current_level <= leafs_level, "invalid parameter"); typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::value_type element_type; + using element_type = int; //typedef typename elements_type::size_type elements_size; // CONSIDER: change to elements_type::size_type or size_type @@ -431,7 +431,7 @@ class load for ( size_t i = 0 ; i < elements_count ; ++i ) { - typedef typename elements_type::value_type::first_type box_type; + using box_type = int; box_type b = serialization_load("b", ar); node_pointer n = raw_apply(ar, version, leafs_level, values_count, parameters, translator, allocators, current_level+1); // recursive call elements.push_back(element_type(b, n)); @@ -449,7 +449,7 @@ class load leaf & l = rtree::get(*n); typedef typename rtree::elements_type::type elements_type; - typedef typename elements_type::value_type element_type; + using element_type = int; elements_type & elements = rtree::elements(l); values_count += elements_count; @@ -477,17 +477,17 @@ template class const_private_view { public: - typedef typename Rtree::size_type size_type; + using size_type = typename Rtree::size_type; - typedef typename Rtree::translator_type translator_type; - typedef typename Rtree::value_type value_type; - typedef typename Rtree::options_type options_type; - typedef typename Rtree::box_type box_type; - typedef typename Rtree::allocators_type allocators_type; + using translator_type = typename Rtree::translator_type; + using value_type = typename Rtree::value_type; + using options_type = typename Rtree::options_type; + using box_type = typename Rtree::box_type; + using allocators_type = typename Rtree::allocators_type; const_private_view(Rtree const& rt) : m_rtree(rt) {} - typedef typename Rtree::members_holder members_holder; + using members_holder = typename Rtree::members_holder; members_holder const& members() const { return m_rtree.m_members; } @@ -502,17 +502,17 @@ template class private_view { public: - typedef typename Rtree::size_type size_type; + using size_type = typename Rtree::size_type; - typedef typename Rtree::translator_type translator_type; - typedef typename Rtree::value_type value_type; - typedef typename Rtree::options_type options_type; - typedef typename Rtree::box_type box_type; - typedef typename Rtree::allocators_type allocators_type; + using translator_type = typename Rtree::translator_type; + using value_type = typename Rtree::value_type; + using options_type = typename Rtree::options_type; + using box_type = typename Rtree::box_type; + using allocators_type = typename Rtree::allocators_type; private_view(Rtree & rt) : m_rtree(rt) {} - typedef typename Rtree::members_holder members_holder; + using members_holder = typename Rtree::members_holder; members_holder & members() { return m_rtree.m_members; } members_holder const& members() const { return m_rtree.m_members; } @@ -534,13 +534,13 @@ void save(Archive & ar, boost::geometry::index::rtree const& rt, { namespace detail = boost::geometry::index::detail; - typedef boost::geometry::index::rtree rtree; - typedef detail::rtree::const_private_view view; - typedef typename view::translator_type translator_type; - typedef typename view::value_type value_type; - typedef typename view::options_type options_type; - typedef typename view::box_type box_type; - typedef typename view::allocators_type allocators_type; + using rtree = boost::geometry::index::rtree; + using view = detail::rtree::const_private_view; + using translator_type = typename view::translator_type; + using value_type = typename view::value_type; + using options_type = typename view::options_type; + using box_type = typename view::box_type; + using allocators_type = typename view::allocators_type; view tree(rt); @@ -563,19 +563,19 @@ void load(Archive & ar, boost::geometry::index::rtree & rt, unsig { namespace detail = boost::geometry::index::detail; - typedef boost::geometry::index::rtree rtree; - typedef detail::rtree::private_view view; - typedef typename view::size_type size_type; - typedef typename view::translator_type translator_type; - typedef typename view::value_type value_type; - typedef typename view::options_type options_type; - typedef typename view::box_type box_type; - typedef typename view::allocators_type allocators_type; - typedef typename view::members_holder members_holder; - - typedef typename options_type::parameters_type parameters_type; - typedef typename allocators_type::node_pointer node_pointer; - typedef detail::rtree::subtree_destroyer subtree_destroyer; + using rtree = boost::geometry::index::rtree; + using view = detail::rtree::private_view; + using size_type = typename view::size_type; + using translator_type = typename view::translator_type; + using value_type = typename view::value_type; + using options_type = typename view::options_type; + using box_type = typename view::box_type; + using allocators_type = typename view::allocators_type; + using members_holder = typename view::members_holder; + + using parameters_type = typename options_type::parameters_type; + using node_pointer = typename allocators_type::node_pointer; + using subtree_destroyer = int; view tree(rt); diff --git a/include/boost/geometry/index/detail/translator.hpp b/include/boost/geometry/index/detail/translator.hpp index 900be6e73d..d9fc099360 100644 --- a/include/boost/geometry/index/detail/translator.hpp +++ b/include/boost/geometry/index/detail/translator.hpp @@ -50,7 +50,7 @@ struct translator : public IndexableGetter , public EqualTo { - typedef typename IndexableGetter::result_type result_type; + using result_type = typename IndexableGetter::result_type; translator(IndexableGetter const& i, EqualTo const& e) : IndexableGetter(i), EqualTo(e) @@ -75,7 +75,7 @@ struct translator template struct result_type { - typedef typename IndexableGetter::result_type type; + using type = typename IndexableGetter::result_type; }; template diff --git a/include/boost/geometry/index/detail/varray.hpp b/include/boost/geometry/index/detail/varray.hpp index 4d010cb828..a20da7e8cd 100644 --- a/include/boost/geometry/index/detail/varray.hpp +++ b/include/boost/geometry/index/detail/varray.hpp @@ -50,24 +50,24 @@ namespace varray_detail { template struct varray_traits { - typedef Value value_type; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef Value* pointer; - typedef const Value* const_pointer; - typedef Value& reference; - typedef const Value& const_reference; - - typedef std::false_type use_memop_in_swap_and_move; - typedef std::false_type use_optimized_swap; - typedef std::false_type disable_trivial_init; + using value_type = Value; + using size_type = int; + using difference_type = int; + using pointer = Value *; + using const_pointer = const Value *; + using reference = Value &; + using const_reference = const Value &; + + using use_memop_in_swap_and_move = int; + using use_optimized_swap = int; + using disable_trivial_init = int; }; template struct checker { - typedef typename Varray::size_type size_type; - typedef typename Varray::const_iterator const_iterator; + using size_type = typename Varray::size_type; + using const_iterator = typename Varray::const_iterator; static inline void check_capacity(Varray const& v, size_type s) { @@ -149,8 +149,8 @@ possible. template class varray { - typedef varray_detail::varray_traits vt; - typedef varray_detail::checker errh; + using vt = varray_detail::varray_traits; + using errh = varray_detail::checker; BOOST_GEOMETRY_STATIC_ASSERT( ( std::is_unsigned::value && @@ -159,9 +159,7 @@ class varray typename vt::size_type, std::integral_constant ); - typedef boost::aligned_storage< - sizeof(Value[Capacity]), - boost::alignment_of::value + using value = int > aligned_storage_type; template @@ -169,28 +167,28 @@ class varray public: //! @brief The type of elements stored in the container. - typedef typename vt::value_type value_type; + using value_type = typename vt::value_type; //! @brief The unsigned integral type used by the container. - typedef typename vt::size_type size_type; + using size_type = typename vt::size_type; //! @brief The pointers difference type. - typedef typename vt::difference_type difference_type; + using difference_type = typename vt::difference_type; //! @brief The pointer type. - typedef typename vt::pointer pointer; + using pointer = typename vt::pointer; //! @brief The const pointer type. - typedef typename vt::const_pointer const_pointer; + using const_pointer = typename vt::const_pointer; //! @brief The value reference type. - typedef typename vt::reference reference; + using reference = typename vt::reference; //! @brief The value const reference type. - typedef typename vt::const_reference const_reference; + using const_reference = typename vt::const_reference; //! @brief The iterator type. - typedef pointer iterator; + using iterator = pointer; //! @brief The const iterator type. - typedef const_pointer const_iterator; + using const_iterator = const_pointer; //! @brief The reverse iterator type. - typedef boost::reverse_iterator reverse_iterator; + using reverse_iterator = int; //! @brief The const reverse iterator. - typedef boost::reverse_iterator const_reverse_iterator; + using const_reverse_iterator = int; //! @brief Constructs an empty varray. //! @@ -363,8 +361,7 @@ class varray //! Linear O(N). varray(varray&& other) { - typedef typename - vt::use_memop_in_swap_and_move use_memop_in_swap_and_move; + using use_memop_in_swap_and_move = typename vt::use_memop_in_swap_and_move; this->move_ctor_dispatch(other, use_memop_in_swap_and_move()); } @@ -393,8 +390,7 @@ class varray { errh::check_capacity(*this, other.size()); // may throw - typedef typename - vt::use_memop_in_swap_and_move use_memop_in_swap_and_move; + using use_memop_in_swap_and_move = typename vt::use_memop_in_swap_and_move; this->move_ctor_dispatch(other, use_memop_in_swap_and_move()); } @@ -417,8 +413,7 @@ class varray if ( &other == this ) return *this; - typedef typename - vt::use_memop_in_swap_and_move use_memop_in_swap_and_move; + using use_memop_in_swap_and_move = typename vt::use_memop_in_swap_and_move; this->move_assign_dispatch(other, use_memop_in_swap_and_move()); @@ -448,8 +443,7 @@ class varray { errh::check_capacity(*this, other.size()); // may throw - typedef typename - vt::use_memop_in_swap_and_move use_memop_in_swap_and_move; + using use_memop_in_swap_and_move = typename vt::use_memop_in_swap_and_move; this->move_assign_dispatch(other, use_memop_in_swap_and_move()); @@ -484,8 +478,7 @@ class varray //! Linear O(N). void swap(varray& other) { - typedef typename - vt::use_optimized_swap use_optimized_swap; + using use_optimized_swap = typename vt::use_optimized_swap; this->swap_dispatch(other, use_optimized_swap()); } @@ -514,8 +507,7 @@ class varray errh::check_capacity(*this, other.size()); errh::check_capacity(other, this->size()); - typedef typename - vt::use_optimized_swap use_optimized_swap; + using use_optimized_swap = typename vt::use_optimized_swap; this->swap_dispatch(other, use_optimized_swap()); } @@ -538,7 +530,7 @@ class varray void resize(size_type count) { namespace sv = varray_detail; - typedef typename vt::disable_trivial_init dti; + using dti = typename vt::disable_trivial_init; if ( count < m_size ) { @@ -620,7 +612,7 @@ class varray //! Constant O(1). void push_back(value_type const& value) { - typedef typename vt::disable_trivial_init dti; + using dti = typename vt::disable_trivial_init; errh::check_capacity(*this, m_size + 1); // may throw @@ -645,7 +637,7 @@ class varray //! Constant O(1). void push_back(value_type&& value) { - typedef typename vt::disable_trivial_init dti; + using dti = typename vt::disable_trivial_init; errh::check_capacity(*this, m_size + 1); // may throw @@ -692,7 +684,7 @@ class varray //! Constant or linear. iterator insert(iterator position, value_type const& value) { - typedef typename vt::disable_trivial_init dti; + using dti = typename vt::disable_trivial_init; namespace sv = varray_detail; errh::check_iterator_end_eq(*this, position); @@ -735,7 +727,7 @@ class varray //! Constant or linear. iterator insert(iterator position, value_type&& value) { - typedef typename vt::disable_trivial_init dti; + using dti = typename vt::disable_trivial_init; namespace sv = varray_detail; errh::check_iterator_end_eq(*this, position); @@ -979,7 +971,7 @@ class varray template void emplace_back(Args&& ...args) { - typedef typename vt::disable_trivial_init dti; + using dti = typename vt::disable_trivial_init; errh::check_capacity(*this, m_size + 1); // may throw @@ -1009,7 +1001,7 @@ class varray template iterator emplace(iterator position, Args&& ...args) { - typedef typename vt::disable_trivial_init dti; + using dti = typename vt::disable_trivial_init; namespace sv = varray_detail; @@ -1487,11 +1479,7 @@ class varray template void swap_dispatch(varray& other, std::true_type /*use_optimized_swap*/) { - typedef std::conditional_t - < - (Capacity < C), - aligned_storage_type, - typename varray::aligned_storage_type + using aligned_storage_type = int > storage_type; storage_type temp; @@ -1514,8 +1502,7 @@ class varray { namespace sv = varray_detail; - typedef typename - vt::use_memop_in_swap_and_move use_memop_in_swap_and_move; + using use_memop_in_swap_and_move = typename vt::use_memop_in_swap_and_move; if ( this->size() < other.size() ) swap_dispatch_impl(this->begin(), this->end(), other.begin(), other.end(), use_memop_in_swap_and_move()); // may throw @@ -1746,22 +1733,22 @@ class varray template class varray { - typedef varray_detail::varray_traits vt; - typedef varray_detail::checker errh; + using vt = varray_detail::varray_traits; + using errh = varray_detail::checker; public: - typedef typename vt::value_type value_type; - typedef typename vt::size_type size_type; - typedef typename vt::difference_type difference_type; - typedef typename vt::pointer pointer; - typedef typename vt::const_pointer const_pointer; - typedef typename vt::reference reference; - typedef typename vt::const_reference const_reference; - - typedef pointer iterator; - typedef const_pointer const_iterator; - typedef boost::reverse_iterator reverse_iterator; - typedef boost::reverse_iterator const_reverse_iterator; + using value_type = typename vt::value_type; + using size_type = typename vt::size_type; + using difference_type = typename vt::difference_type; + using pointer = typename vt::pointer; + using const_pointer = typename vt::const_pointer; + using reference = typename vt::reference; + using const_reference = typename vt::const_reference; + + using iterator = pointer; + using const_iterator = const_pointer; + using reverse_iterator = int; + using const_reverse_iterator = int; // nothrow varray() {} diff --git a/include/boost/geometry/index/detail/varray_detail.hpp b/include/boost/geometry/index/detail/varray_detail.hpp index cd9ff6b88e..a452b66766 100644 --- a/include/boost/geometry/index/detail/varray_detail.hpp +++ b/include/boost/geometry/index/detail/varray_detail.hpp @@ -381,8 +381,7 @@ template inline O uninitialized_move_if_noexcept(I first, I last, O dst) { - typedef std::is_nothrow_move_constructible< - typename ::boost::iterator_value::type + using type = int > use_move; return uninitialized_move_if_noexcept_dispatch(first, last, dst, use_move()); // may throw @@ -410,8 +409,7 @@ template inline O move_if_noexcept(I first, I last, O dst) { - typedef std::is_nothrow_move_constructible< - typename ::boost::iterator_value::type + using type = int > use_move; return move_if_noexcept_dispatch(first, last, dst, use_move()); // may throw @@ -487,10 +485,7 @@ inline void construct(DisableTrivialInit const&, I pos) { typedef typename ::boost::iterator_value::type value_type; - typedef std::integral_constant - < - bool, - std::is_trivially_constructible::value + using value = int && DisableTrivialInit::value > dont_init; diff --git a/include/boost/geometry/index/equal_to.hpp b/include/boost/geometry/index/equal_to.hpp index 85fa7e5ad6..0aa5039940 100644 --- a/include/boost/geometry/index/equal_to.hpp +++ b/include/boost/geometry/index/equal_to.hpp @@ -152,7 +152,7 @@ template { /*! \brief The type of result returned by function object. */ - typedef typename detail::equal_to::result_type result_type; + using result_type = int; /*! \brief Compare Values. diff --git a/include/boost/geometry/index/indexable.hpp b/include/boost/geometry/index/indexable.hpp index 84cf05face..6072d803e6 100644 --- a/include/boost/geometry/index/indexable.hpp +++ b/include/boost/geometry/index/indexable.hpp @@ -61,7 +61,7 @@ struct indexable Value); /*! \brief The type of result returned by function object. */ - typedef Value const& result_type; + using result_type = const Value &; /*! \brief Return indexable extracted from the value. @@ -154,7 +154,7 @@ This specialization translates from boost::tuple template struct indexable_boost_tuple { - typedef Value value_type; + using value_type = Value; BOOST_GEOMETRY_STATIC_ASSERT( (detail::is_indexable::value), @@ -162,7 +162,7 @@ struct indexable_boost_tuple Indexable); /*! \brief The type of result returned by function object. */ - typedef Indexable const& result_type; + using result_type = const Indexable &; /*! \brief Return indexable extracted from the value. @@ -332,7 +332,7 @@ struct indexable : detail::indexable { /*! \brief The type of result returned by function object. It should be const Indexable reference. */ - typedef typename detail::indexable::result_type result_type; + using result_type = int; /*! \brief Return indexable extracted from the value. diff --git a/include/boost/geometry/index/inserter.hpp b/include/boost/geometry/index/inserter.hpp index 8ef2a4606d..b7e4bcfd3d 100644 --- a/include/boost/geometry/index/inserter.hpp +++ b/include/boost/geometry/index/inserter.hpp @@ -23,13 +23,13 @@ template class insert_iterator { public: - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; + using iterator_category = int; + using value_type = void; + using difference_type = void; + using pointer = void; + using reference = void; - typedef Container container_type; + using container_type = Container; inline explicit insert_iterator(Container & c) : container(&c) diff --git a/include/boost/geometry/index/parameters.hpp b/include/boost/geometry/index/parameters.hpp index d5d8d87fe1..50430f3dd3 100644 --- a/include/boost/geometry/index/parameters.hpp +++ b/include/boost/geometry/index/parameters.hpp @@ -292,15 +292,15 @@ namespace detail template struct strategy_type { - typedef default_strategy type; - typedef default_strategy result_type; + using type = int; + using result_type = int; }; template struct strategy_type< parameters > { - typedef Strategy type; - typedef Strategy const& result_type; + using type = Strategy; + using result_type = const Strategy &; }; diff --git a/include/boost/geometry/index/rtree.hpp b/include/boost/geometry/index/rtree.hpp index 584a77624b..1d2aacd1b0 100644 --- a/include/boost/geometry/index/rtree.hpp +++ b/include/boost/geometry/index/rtree.hpp @@ -174,15 +174,15 @@ class rtree { public: /*! \brief The type of Value stored in the container. */ - typedef Value value_type; + using value_type = Value; /*! \brief R-tree parameters type. */ - typedef Parameters parameters_type; + using parameters_type = Parameters; /*! \brief The function object extracting Indexable from Value. */ - typedef IndexableGetter indexable_getter; + using indexable_getter = IndexableGetter; /*! \brief The function object comparing objects of type Value. */ - typedef EqualTo value_equal; + using value_equal = EqualTo; /*! \brief The type of allocator used by the container. */ - typedef Allocator allocator_type; + using allocator_type = Allocator; // TODO: SHOULD THIS TYPE BE REMOVED? /*! \brief The Indexable type to which Value is translated. */ @@ -191,10 +191,7 @@ class rtree >::type indexable_type; /*! \brief The Box type used by the R-tree. */ - typedef geometry::model::box< - geometry::model::point< - typename coordinate_type::type, - dimension::value, + using value = int, typename coordinate_system::type > > @@ -202,7 +199,7 @@ class rtree private: - typedef bounds_type box_type; + using box_type = int; struct members_holder : public detail::translator @@ -216,21 +213,18 @@ class rtree typename detail::rtree::options_type::type::node_tag > { - typedef Value value_type; - typedef typename rtree::bounds_type bounds_type; - typedef Parameters parameters_type; + using value_type = Value; + using bounds_type = int; + using parameters_type = Parameters; //typedef IndexableGetter indexable_getter; //typedef EqualTo value_equal; //typedef Allocator allocator_type; - typedef bounds_type box_type; - typedef detail::translator translator_type; + using box_type = bounds_type; + using translator_type = int; typedef typename detail::rtree::options_type::type options_type; - typedef typename options_type::node_tag node_tag; - typedef detail::rtree::allocators - < - Allocator, Value, Parameters, bounds_type, node_tag - > allocators_type; + using node_tag = int; + using allocators_type = int; typedef typename detail::rtree::node < @@ -255,10 +249,10 @@ class rtree value_type, parameters_type, bounds_type, allocators_type, node_tag, true >::type visitor_const; - typedef typename allocators_type::node_pointer node_pointer; + using node_pointer = int; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef typename allocators_type::size_type size_type; + using allocator_traits_type = int; + using size_type = int; private: members_holder(members_holder const&); @@ -306,15 +300,15 @@ class rtree node_pointer root; }; - typedef typename members_holder::translator_type translator_type; - typedef typename members_holder::options_type options_type; - typedef typename members_holder::allocators_type allocators_type; - typedef typename members_holder::node node; - typedef typename members_holder::internal_node internal_node; - typedef typename members_holder::leaf leaf; + using translator_type = typename members_holder::translator_type; + using options_type = typename members_holder::options_type; + using allocators_type = typename members_holder::allocators_type; + using node = typename members_holder::node; + using internal_node = typename members_holder::internal_node; + using leaf = typename members_holder::leaf; - typedef typename members_holder::node_pointer node_pointer; - typedef typename members_holder::allocator_traits_type allocator_traits_type; + using node_pointer = typename members_holder::node_pointer; + using allocator_traits_type = typename members_holder::allocator_traits_type; friend class detail::rtree::utilities::view; #ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL_SERIALIZATION @@ -325,29 +319,23 @@ class rtree public: /*! \brief Type of reference to Value. */ - typedef typename allocators_type::reference reference; + using reference = typename allocators_type::reference; /*! \brief Type of reference to const Value. */ - typedef typename allocators_type::const_reference const_reference; + using const_reference = typename allocators_type::const_reference; /*! \brief Type of pointer to Value. */ - typedef typename allocators_type::pointer pointer; + using pointer = typename allocators_type::pointer; /*! \brief Type of pointer to const Value. */ - typedef typename allocators_type::const_pointer const_pointer; + using const_pointer = typename allocators_type::const_pointer; /*! \brief Type of difference type. */ - typedef typename allocators_type::difference_type difference_type; + using difference_type = typename allocators_type::difference_type; /*! \brief Unsigned integral type used by the container. */ - typedef typename allocators_type::size_type size_type; + using size_type = typename allocators_type::size_type; /*! \brief Type of const iterator, category ForwardIterator. */ - typedef index::detail::rtree::iterators::iterator - < - value_type, options_type, translator_type, box_type, allocators_type - > const_iterator; + using const_iterator = int; /*! \brief Type of const query iterator, category ForwardIterator. */ - typedef index::detail::rtree::iterators::query_iterator - < - value_type, allocators_type - > const_query_iterator; + using const_query_iterator = int; public: @@ -717,9 +705,7 @@ class rtree // (allocators stored as base classes of members_holder) // copying them changes values_count, in this case it doesn't cause errors since data must be copied - typedef std::integral_constant propagate; + using propagate = int; if ( propagate::value && !(this_allocs == src_allocs) ) this->raw_destroy(*this); @@ -767,9 +753,7 @@ class rtree // (allocators stored as base classes of members_holder) // moving them changes values_count - typedef std::integral_constant propagate; + using propagate = int; detail::move_cond(this_allocs, src_allocs, propagate()); } else @@ -804,9 +788,7 @@ class rtree // (allocators stored as base classes of members_holder) // swapping them changes values_count - typedef std::integral_constant propagate; + using propagate = int; detail::swap_cond(m_members.allocators(), other.m_members.allocators(), propagate()); boost::core::invoke_swap(m_members.values_count, other.m_members.values_count); @@ -884,8 +866,8 @@ class rtree if ( !m_members.root ) this->raw_create(); - typedef std::is_convertible is_conv_t; - typedef range::detail::is_range is_range_t; + using is_conv_t = int; + using is_range_t = int; BOOST_GEOMETRY_STATIC_ASSERT((is_conv_t::value || is_range_t::value), "The argument has to be convertible to Value type or be a Range.", ConvertibleOrRange); @@ -984,8 +966,8 @@ class rtree if ( !m_members.root ) return 0; - typedef std::is_convertible is_conv_t; - typedef range::detail::is_range is_range_t; + using is_conv_t = int; + using is_range_t = int; BOOST_GEOMETRY_STATIC_ASSERT((is_conv_t::value || is_range_t::value), "The argument has to be convertible to Value type or be a Range.", ConvertibleOrRange); @@ -1930,7 +1912,7 @@ class rtree template inline void pack_construct(Iterator first, Iterator last, PackAlloc const& temp_allocator) { - typedef detail::rtree::pack pack; + using pack = int; size_type vc = 0, ll = 0; m_members.root = pack::apply(first, last, vc, ll, m_members.parameters(), m_members.translator(), @@ -2383,10 +2365,7 @@ struct range_mutable_iterator boost::geometry::index::rtree > { - typedef typename boost::geometry::index::rtree - < - Value, Parameters, IndexableGetter, EqualTo, Allocator - >::const_iterator type; + using type = typename boost::geometry::index::rtree::const_iterator; }; } // namespace boost diff --git a/include/boost/geometry/io/dsv/write.hpp b/include/boost/geometry/io/dsv/write.hpp index e73cdfb810..37a85188b1 100644 --- a/include/boost/geometry/io/dsv/write.hpp +++ b/include/boost/geometry/io/dsv/write.hpp @@ -207,7 +207,7 @@ struct dsv_poly Polygon const& poly, dsv_settings const& settings) { - typedef typename ring_type::type ring; + using ring = int; os << settings.list_open; diff --git a/include/boost/geometry/io/svg/svg_mapper.hpp b/include/boost/geometry/io/svg/svg_mapper.hpp index a81e874e51..374ad8418d 100644 --- a/include/boost/geometry/io/svg/svg_mapper.hpp +++ b/include/boost/geometry/io/svg/svg_mapper.hpp @@ -266,7 +266,7 @@ template > class svg_mapper : boost::noncopyable { - typedef model::point svg_point_type; + using svg_point_type = int; typedef typename geometry::select_most_precise < diff --git a/include/boost/geometry/io/svg/write.hpp b/include/boost/geometry/io/svg/write.hpp index a8be963fdf..ce111fecc3 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 = int; ct x = geometry::get(box); ct y = geometry::get(box); ct width = max BOOST_PREVENT_MACRO_SUBSTITUTION (ct(1), @@ -92,7 +92,7 @@ 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; + using ct = int; ct x1 = geometry::get<0, 0>(segment); ct y1 = geometry::get<0, 1>(segment); ct x2 = geometry::get<1, 0>(segment); diff --git a/include/boost/geometry/iterators/closing_iterator.hpp b/include/boost/geometry/iterators/closing_iterator.hpp index 35fd1737c1..294ea8bc80 100644 --- a/include/boost/geometry/iterators/closing_iterator.hpp +++ b/include/boost/geometry/iterators/closing_iterator.hpp @@ -53,18 +53,15 @@ struct closing_iterator > { private: - typedef boost::iterator_facade - < - closing_iterator, - typename boost::range_value::type const, + using type = int const, boost::random_access_traversal_tag, typename boost::range_reference::type, typename boost::range_difference::type > base_type; public: - typedef typename base_type::reference reference; - typedef typename base_type::difference_type difference_type; + using reference = int; + using difference_type = int; /// Constructor including the range it is based on explicit inline closing_iterator(Range const& range) diff --git a/include/boost/geometry/iterators/concatenate_iterator.hpp b/include/boost/geometry/iterators/concatenate_iterator.hpp index 42145ec254..2ec185e96e 100644 --- a/include/boost/geometry/iterators/concatenate_iterator.hpp +++ b/include/boost/geometry/iterators/concatenate_iterator.hpp @@ -43,8 +43,8 @@ class concatenate_iterator Iterator2 m_begin2, m_it2; public: - typedef Iterator1 first_iterator_type; - typedef Iterator2 second_iterator_type; + using first_iterator_type = Iterator1; + using second_iterator_type = Iterator2; // default constructor concatenate_iterator() = default; diff --git a/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp b/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp index 8e93cf56eb..90b9bd994c 100644 --- a/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp +++ b/include/boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp @@ -36,9 +36,7 @@ template > struct inner_range_type { - typedef std::conditional_t - < - ! std::is_const::value, + using value = int, typename boost::range_value::type, typename boost::range_value::type const > type; 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 c5321b1181..5671bf3587 100644 --- a/include/boost/geometry/iterators/detail/point_iterator/value_type.hpp +++ b/include/boost/geometry/iterators/detail/point_iterator/value_type.hpp @@ -29,9 +29,7 @@ namespace detail { namespace point_iterator template struct value_type { - typedef std::conditional_t - < - ! std::is_const::value, + using value = int, typename geometry::point_type::type, typename geometry::point_type::type const > type; diff --git a/include/boost/geometry/iterators/detail/segment_iterator/range_segment_iterator.hpp b/include/boost/geometry/iterators/detail/segment_iterator/range_segment_iterator.hpp index 5c50e39dd7..1e8d819b3c 100644 --- a/include/boost/geometry/iterators/detail/segment_iterator/range_segment_iterator.hpp +++ b/include/boost/geometry/iterators/detail/segment_iterator/range_segment_iterator.hpp @@ -109,7 +109,7 @@ class range_segment_iterator } public: - typedef typename range_iterator_type::type iterator_type; + using iterator_type = int; // default constructor range_segment_iterator() @@ -148,10 +148,7 @@ class range_segment_iterator > const& other) : m_it(other.m_it) { - typedef typename range_segment_iterator - < - OtherRange, OtherValue, OtherReference - >::iterator_type other_iterator_type; + using other_iterator_type = typename range_segment_iterator::iterator_type; static const bool are_conv = std::is_convertible::value; diff --git a/include/boost/geometry/iterators/detail/segment_iterator/value_type.hpp b/include/boost/geometry/iterators/detail/segment_iterator/value_type.hpp index f2a858a811..4afdefe8b6 100644 --- a/include/boost/geometry/iterators/detail/segment_iterator/value_type.hpp +++ b/include/boost/geometry/iterators/detail/segment_iterator/value_type.hpp @@ -46,9 +46,7 @@ struct value_type // it would store pointers to temporary objects. Instead we use a // segment, which does a full copy of the temporary objects // returned by the point iterator. - typedef std::conditional_t - < - std::is_reference::value, + using value = int, geometry::model::pointing_segment, geometry::model::segment < diff --git a/include/boost/geometry/iterators/ever_circling_iterator.hpp b/include/boost/geometry/iterators/ever_circling_iterator.hpp index 413bdfc281..6a8f2a2e70 100644 --- a/include/boost/geometry/iterators/ever_circling_iterator.hpp +++ b/include/boost/geometry/iterators/ever_circling_iterator.hpp @@ -133,10 +133,7 @@ struct ever_circling_range_iterator > { private: - typedef boost::iterator_facade - < - ever_circling_range_iterator, - typename boost::range_value::type const, + using type = int const, boost::random_access_traversal_tag, typename boost::range_reference::type, typename boost::range_difference::type @@ -178,7 +175,7 @@ struct ever_circling_range_iterator {} typedef typename base_type::reference reference; - typedef typename base_type::difference_type difference_type; + using difference_type = int; private: template friend struct ever_circling_range_iterator; diff --git a/include/boost/geometry/iterators/flatten_iterator.hpp b/include/boost/geometry/iterators/flatten_iterator.hpp index cdfb5ab1bd..41f58de9ae 100644 --- a/include/boost/geometry/iterators/flatten_iterator.hpp +++ b/include/boost/geometry/iterators/flatten_iterator.hpp @@ -55,8 +55,8 @@ class flatten_iterator InnerIterator m_inner_it; public: - typedef OuterIterator outer_iterator_type; - typedef InnerIterator inner_iterator_type; + using outer_iterator_type = OuterIterator; + using inner_iterator_type = InnerIterator; // default constructor flatten_iterator() = default; diff --git a/include/boost/geometry/iterators/point_reverse_iterator.hpp b/include/boost/geometry/iterators/point_reverse_iterator.hpp index 9c8cb492e6..6d2c5c9f6f 100644 --- a/include/boost/geometry/iterators/point_reverse_iterator.hpp +++ b/include/boost/geometry/iterators/point_reverse_iterator.hpp @@ -25,7 +25,7 @@ class point_reverse_iterator : public std::reverse_iterator > { private: - typedef std::reverse_iterator > base_type; + using base_type = int; template friend class point_reverse_iterator; template diff --git a/include/boost/geometry/iterators/segment_iterator.hpp b/include/boost/geometry/iterators/segment_iterator.hpp index 84af76e9c7..ce76c110f9 100644 --- a/include/boost/geometry/iterators/segment_iterator.hpp +++ b/include/boost/geometry/iterators/segment_iterator.hpp @@ -282,7 +282,7 @@ class segment_iterator // this iterator) degrades automatically the iterator's category // to input iterator. With the following typedef we recover the // correct iterator category. - typedef std::bidirectional_iterator_tag iterator_category; + using iterator_category = int; inline segment_iterator() = default; diff --git a/include/boost/geometry/policies/relate/direction.hpp b/include/boost/geometry/policies/relate/direction.hpp index 11c18d6e48..a5e339e100 100644 --- a/include/boost/geometry/policies/relate/direction.hpp +++ b/include/boost/geometry/policies/relate/direction.hpp @@ -113,7 +113,7 @@ struct direction_type struct segments_direction { - typedef direction_type return_type; + using return_type = direction_type; template < diff --git a/include/boost/geometry/policies/relate/intersection_points.hpp b/include/boost/geometry/policies/relate/intersection_points.hpp index 1b11c59f4e..4d3fadc7f6 100644 --- a/include/boost/geometry/policies/relate/intersection_points.hpp +++ b/include/boost/geometry/policies/relate/intersection_points.hpp @@ -40,7 +40,7 @@ template > struct segments_intersection_points { - typedef ReturnType return_type; + using return_type = ReturnType; template < diff --git a/include/boost/geometry/policies/relate/intersection_policy.hpp b/include/boost/geometry/policies/relate/intersection_policy.hpp index 6a573f9f20..5580237486 100644 --- a/include/boost/geometry/policies/relate/intersection_policy.hpp +++ b/include/boost/geometry/policies/relate/intersection_policy.hpp @@ -33,17 +33,14 @@ template struct segments_intersection_policy { private: - typedef policies::relate::segments_intersection_points - < - IntersectionPointsReturnType - > pts_policy; - typedef policies::relate::segments_direction dir_policy; + using pts_policy = int; + using dir_policy = int; public: struct return_type { - typedef typename pts_policy::return_type intersection_points_type; - typedef typename dir_policy::return_type direction_type; + using intersection_points_type = int; + using direction_type = int; return_type(intersection_points_type const& pts_result, direction_type const& dir_result) diff --git a/include/boost/geometry/policies/relate/intersection_ratios.hpp b/include/boost/geometry/policies/relate/intersection_ratios.hpp index 0d4f4f1413..9f5dbaeaa9 100644 --- a/include/boost/geometry/policies/relate/intersection_ratios.hpp +++ b/include/boost/geometry/policies/relate/intersection_ratios.hpp @@ -37,7 +37,7 @@ template > struct segments_intersection_ratios { - typedef FractionType return_type; + using return_type = FractionType; template < diff --git a/include/boost/geometry/srs/projection.hpp b/include/boost/geometry/srs/projection.hpp index 00e4523f79..4e13c06ba7 100644 --- a/include/boost/geometry/srs/projection.hpp +++ b/include/boost/geometry/srs/projection.hpp @@ -63,9 +63,7 @@ struct same_tags template struct promote_to_double { - typedef std::conditional_t - < - std::is_integral::value || std::is_same::value, + using value = int || std::is_same::value, double, CT > type; }; @@ -386,9 +384,9 @@ class proj_wrapper template class static_proj_wrapper_base { - typedef typename projections::detail::promote_to_double::type calc_t; + using calc_t = typename projections::detail::promote_to_double::type; - typedef projections::parameters parameters_type; + using parameters_type = int; typedef typename srs::spar::detail::pick_proj_tag < @@ -446,7 +444,7 @@ template class projection : private proj_wrapper { - typedef proj_wrapper base_t; + using base_t = proj_wrapper; public: projection() @@ -516,7 +514,7 @@ template class projection : public projections::projection { - typedef projections::projection base_t; + using base_t = projections::projection; public: projection() diff --git a/include/boost/geometry/srs/projections/dpar.hpp b/include/boost/geometry/srs/projections/dpar.hpp index 696246c18f..e401278c71 100644 --- a/include/boost/geometry/srs/projections/dpar.hpp +++ b/include/boost/geometry/srs/projections/dpar.hpp @@ -731,13 +731,13 @@ struct parameter template class parameters { - typedef std::vector > container_type; + using container_type = int; public: - typedef typename container_type::value_type value_type; - typedef typename container_type::const_iterator const_iterator; - typedef typename container_type::const_reference const_reference; - typedef typename container_type::size_type size_type; + using value_type = int; + using const_iterator = int; + using const_reference = int; + using size_type = int; BOOST_DEFAULTED_FUNCTION(parameters(), {}) diff --git a/include/boost/geometry/srs/projections/factory.hpp b/include/boost/geometry/srs/projections/factory.hpp index acea3b5125..04b2028365 100644 --- a/include/boost/geometry/srs/projections/factory.hpp +++ b/include/boost/geometry/srs/projections/factory.hpp @@ -173,18 +173,13 @@ template class factory { private: - typedef detail::factory_entry - < - Params, - CT, - ProjParams - > entry_base; + using entry_base = int; - typedef factory_key key; - typedef typename key::type key_type; - typedef std::shared_ptr entry_ptr; + using key = factory_key; + using key_type = typename key::type; + using entry_ptr = int; - typedef std::map entries_map; + using entries_map = int; entries_map m_entries; @@ -302,7 +297,7 @@ class factory detail::dynamic_wrapper_b* create_new(Params const& params, ProjParams const& proj_par) const { - typedef typename entries_map::const_iterator const_iterator; + using const_iterator = int; const_iterator it = m_entries.find(key::get(proj_par)); if (it != m_entries.end()) { diff --git a/include/boost/geometry/srs/projections/grids.hpp b/include/boost/geometry/srs/projections/grids.hpp index 315ac4a06a..13797ed5c5 100644 --- a/include/boost/geometry/srs/projections/grids.hpp +++ b/include/boost/geometry/srs/projections/grids.hpp @@ -47,14 +47,14 @@ class grids return gridinfo.empty(); } - typedef projections::detail::grids_tag tag; + using tag = projections::detail::grids_tag; projections::detail::pj_gridinfo gridinfo; }; struct ifstream_policy { - typedef std::ifstream stream_type; + using stream_type = int; static inline void open(stream_type & is, std::string const& gridname) { @@ -69,8 +69,8 @@ template > struct grids_storage { - typedef StreamPolicy stream_policy_type; - typedef Grids grids_type; + using stream_policy_type = StreamPolicy; + using grids_type = Grids; grids_storage() {} @@ -92,7 +92,7 @@ class projection_grids : m_storage_ptr(boost::addressof(storage)) {} - typedef GridsStorage grids_storage_type; + using grids_storage_type = GridsStorage; GridsStorage & grids_storage() const { diff --git a/include/boost/geometry/srs/projections/impl/base_dynamic.hpp b/include/boost/geometry/srs/projections/impl/base_dynamic.hpp index de94bade04..4ce7cf953a 100644 --- a/include/boost/geometry/srs/projections/impl/base_dynamic.hpp +++ b/include/boost/geometry/srs/projections/impl/base_dynamic.hpp @@ -101,7 +101,7 @@ class dynamic_wrapper_f : public dynamic_wrapper_b , protected Prj { - typedef dynamic_wrapper_b base_t; + using base_t = dynamic_wrapper_b; public: template @@ -134,7 +134,7 @@ class dynamic_wrapper_f template class dynamic_wrapper_fi : public dynamic_wrapper_f { - typedef dynamic_wrapper_f base_t; + using base_t = dynamic_wrapper_f; public: template diff --git a/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp b/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp index 128c70e689..90b7e46ad7 100644 --- a/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_ell_set.hpp @@ -363,11 +363,7 @@ inline void pj_ell_init(Params const& params, T &a, T &es) template struct static_srs_tag_check_nonexpanded { - typedef std::conditional_t - < - geometry::tuples::exists_if - < - Params, srs::spar::detail::is_param_t::pred + using pred = int >::value || geometry::tuples::exists_if < @@ -482,7 +478,7 @@ template struct static_srs_tag { // User passed one of the non-ellps, non-datum parameters - typedef NonExpandedTag type; + using type = NonExpandedTag; }; template @@ -490,7 +486,7 @@ struct static_srs_tag { // User didn't pass neither one of the non-ellps, non-datum parameters // but passed ellps - typedef EllpsTag type; + using type = EllpsTag; }; template @@ -498,7 +494,7 @@ struct static_srs_tag { // User didn't pass neither one of the non-ellps, non-datum parameters // nor ellps parameter but passed datum parameter - typedef DatumTag type; + using type = DatumTag; }; template @@ -506,11 +502,7 @@ struct static_srs_tag { // User didn't pass any parameter defining model // so use default or generate error - typedef std::conditional_t - < - geometry::tuples::exists_if - < - Params, srs::spar::detail::is_param::pred + using pred = int >::value, void, srs_spheroid_tag // WGS84 diff --git a/include/boost/geometry/srs/projections/impl/pj_fwd.hpp b/include/boost/geometry/srs/projections/impl/pj_fwd.hpp index 786be4bc0c..f17daa3202 100644 --- a/include/boost/geometry/srs/projections/impl/pj_fwd.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_fwd.hpp @@ -57,7 +57,7 @@ namespace detail { template inline void pj_fwd(Prj const& prj, P const& par, LL const& ll, XY& xy) { - typedef typename P::type calc_t; + using calc_t = typename P::type; static const calc_t EPS = 1.0e-12; using namespace detail; diff --git a/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp b/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp index 2822fe6959..0ccc31f20f 100644 --- a/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_gridinfo.hpp @@ -127,7 +127,7 @@ struct pj_ctable struct pj_gi_load { enum format_t { missing = 0, ntv1, ntv2, gtx, ctable, ctable2 }; - typedef boost::long_long_type offset_t; + using offset_t = int; explicit pj_gi_load(std::string const& gname = "", format_t f = missing, @@ -178,7 +178,7 @@ struct pj_gi } }; -typedef std::vector pj_gridinfo; +using pj_gridinfo = int; /************************************************************************/ diff --git a/include/boost/geometry/srs/projections/impl/pj_inv.hpp b/include/boost/geometry/srs/projections/impl/pj_inv.hpp index 0a3d55cf0d..ae7cbb2053 100644 --- a/include/boost/geometry/srs/projections/impl/pj_inv.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_inv.hpp @@ -57,7 +57,7 @@ namespace detail template inline void pj_inv(PRJ const& prj, PAR const& par, XY const& xy, LL& ll) { - typedef typename PAR::type calc_t; + using calc_t = typename PAR::type; static const calc_t EPS = 1.0e-12; /* can't do as much preliminary checking as with forward */ diff --git a/include/boost/geometry/srs/projections/impl/pj_param.hpp b/include/boost/geometry/srs/projections/impl/pj_param.hpp index 3ff1b06d15..ed93766101 100644 --- a/include/boost/geometry/srs/projections/impl/pj_param.hpp +++ b/include/boost/geometry/srs/projections/impl/pj_param.hpp @@ -81,7 +81,7 @@ template inline typename Params::const_iterator pj_param_find(Params const& params, Name const& name) { - typedef typename Params::const_iterator iterator; + using iterator = typename Params::const_iterator; for (iterator it = params.begin(); it != params.end(); it++) { if (pj_param_pred(*it, name)) diff --git a/include/boost/geometry/srs/projections/impl/pj_transform.hpp b/include/boost/geometry/srs/projections/impl/pj_transform.hpp index 9f16c0e6f6..160bae1ada 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 = int; 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 = int; static inline type get(Point const& ) { return type(0); @@ -119,9 +119,9 @@ template > struct range_wrapper { - typedef Range range_type; + using range_type = Range; typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using coord_t = int; range_wrapper(Range & range) : m_range(range) @@ -139,9 +139,9 @@ struct range_wrapper template struct range_wrapper { - typedef Range range_type; + using range_type = Range; typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using coord_t = int; range_wrapper(Range & range) : m_range(range) @@ -238,7 +238,7 @@ inline bool pj_transform(SrcPrj const& srcprj, Par const& srcdefn, { typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using coord_t = int; static const std::size_t dimension = geometry::dimension::value; std::size_t point_count = boost::size(range); bool result = true; @@ -763,7 +763,7 @@ inline int pj_geocentric_to_wgs84( Par const& defn, { typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using coord_t = int; Range & rng = range_wrapper.get_range(); std::size_t point_count = boost::size(rng); @@ -820,7 +820,7 @@ inline int pj_geocentric_from_wgs84( Par const& defn, { typedef typename boost::range_value::type point_type; - typedef typename coordinate_type::type coord_t; + using coord_t = int; Range & rng = range_wrapper.get_range(); std::size_t point_count = boost::size(rng); @@ -891,7 +891,7 @@ inline bool pj_datum_transform(Par const& srcdefn, Grids const& dstgrids) { - typedef typename Par::type calc_t; + using calc_t = typename Par::type; // This has to be consistent with default spheroid and pj_ellps // TODO: Define in one place diff --git a/include/boost/geometry/srs/projections/impl/projects.hpp b/include/boost/geometry/srs/projections/impl/projects.hpp index a3b8a64fbb..06e9b2882c 100644 --- a/include/boost/geometry/srs/projections/impl/projects.hpp +++ b/include/boost/geometry/srs/projections/impl/projects.hpp @@ -164,7 +164,7 @@ struct pj_complex { T r, i; }; template struct parameters : public detail::pj_consts { - typedef T type; + using type = T; struct proj_id { diff --git a/include/boost/geometry/srs/projections/par_data.hpp b/include/boost/geometry/srs/projections/par_data.hpp index 5f485433a8..bfc7c0038d 100644 --- a/include/boost/geometry/srs/projections/par_data.hpp +++ b/include/boost/geometry/srs/projections/par_data.hpp @@ -26,7 +26,7 @@ namespace detail struct nadgrids : std::vector { - typedef std::vector base_t; + using base_t = int; nadgrids() {} @@ -77,12 +77,12 @@ struct towgs84 { static const std::size_t static_capacity = 7; - typedef std::size_t size_type; - typedef T value_type; - typedef T* iterator; - typedef const T* const_iterator; - typedef T& reference; - typedef const T& const_reference; + using size_type = int; + using value_type = T; + using iterator = T *; + using const_iterator = const T *; + using reference = T &; + using const_reference = const T &; towgs84() : m_size(0) @@ -181,12 +181,12 @@ struct axis { static const std::size_t static_capacity = 3; - typedef std::size_t size_type; - typedef int value_type; - typedef int* iterator; - typedef const int* const_iterator; - typedef int& reference; - typedef const int& const_reference; + using size_type = int; + using value_type = int; + using iterator = int *; + using const_iterator = const int *; + using reference = int &; + using const_reference = const int &; axis() : m_size(3) diff --git a/include/boost/geometry/srs/projections/proj/aeqd.hpp b/include/boost/geometry/srs/projections/proj/aeqd.hpp index ca9f49bdf2..35137e7c8a 100644 --- a/include/boost/geometry/srs/projections/proj/aeqd.hpp +++ b/include/boost/geometry/srs/projections/proj/aeqd.hpp @@ -497,7 +497,7 @@ namespace projections template struct static_projection_type { - typedef static_wrapper_fi, P> type; + using type = int; }; template struct static_projection_type diff --git a/include/boost/geometry/srs/projections/proj/merc.hpp b/include/boost/geometry/srs/projections/proj/merc.hpp index 54c26f7021..80d3ea1b7c 100644 --- a/include/boost/geometry/srs/projections/proj/merc.hpp +++ b/include/boost/geometry/srs/projections/proj/merc.hpp @@ -134,7 +134,7 @@ namespace projections template inline void setup_merc(Params const& params, Parameters& par) { - typedef typename Parameters::type calc_t; + using calc_t = typename Parameters::type; static const calc_t half_pi = detail::half_pi(); calc_t phits=0.0; diff --git a/include/boost/geometry/srs/projections/proj/nzmg.hpp b/include/boost/geometry/srs/projections/proj/nzmg.hpp index 4c0d832843..ea185a45f5 100644 --- a/include/boost/geometry/srs/projections/proj/nzmg.hpp +++ b/include/boost/geometry/srs/projections/proj/nzmg.hpp @@ -168,7 +168,7 @@ namespace projections template inline void setup_nzmg(Parameters& par) { - typedef typename Parameters::type calc_t; + using calc_t = typename Parameters::type; static const calc_t d2r = geometry::math::d2r(); /* force to International major axis */ diff --git a/include/boost/geometry/srs/projections/proj/ob_tran.hpp b/include/boost/geometry/srs/projections/proj/ob_tran.hpp index edcea4fb68..3ec508dc65 100644 --- a/include/boost/geometry/srs/projections/proj/ob_tran.hpp +++ b/include/boost/geometry/srs/projections/proj/ob_tran.hpp @@ -599,7 +599,7 @@ namespace projections template struct static_projection_type { - typedef static_wrapper_fi, P> type; + using type = int; }; template struct static_projection_type diff --git a/include/boost/geometry/srs/projections/spar.hpp b/include/boost/geometry/srs/projections/spar.hpp index a727aa79c0..d52d444c9a 100644 --- a/include/boost/geometry/srs/projections/spar.hpp +++ b/include/boost/geometry/srs/projections/spar.hpp @@ -60,13 +60,13 @@ struct parameters_base template struct parameters_base { - typedef typename parameters_base::type type; + using type = typename parameters_base::type; }; template struct parameters_base<0, P, Ps...> { - typedef parameters type; + using type = parameters; }; } // namespace detail @@ -448,7 +448,7 @@ template > struct ellps { - typedef SpheroidOrSphere model_type; + using model_type = SpheroidOrSphere; ellps() : model() {} explicit ellps(SpheroidOrSphere const& sph) : model(sph) {} @@ -459,7 +459,7 @@ struct ellps struct nadgrids : srs::detail::nadgrids { - typedef srs::detail::nadgrids base_t; + using base_t = int; nadgrids(std::string const& g0) : base_t(g0) {} nadgrids(std::string const& g0, std::string const& g1) : base_t(g0, g1) {} nadgrids(std::string const& g0, std::string const& g1, std::string const& g2) : base_t(g0, g1, g2) {} @@ -471,14 +471,14 @@ struct nadgrids template struct o_proj { - typedef Proj type; + using type = Proj; }; template struct towgs84 : srs::detail::towgs84 { - typedef srs::detail::towgs84 base_t; + using base_t = int; towgs84(T const& v0, T const& v1, T const& v2) : base_t(v0, v1, v2) @@ -492,7 +492,7 @@ struct towgs84 struct axis : srs::detail::axis { - typedef srs::detail::axis base_t; + using base_t = int; axis(int const& v0, int const& v1, int const& v2) : base_t(v0, v1, v2) @@ -503,7 +503,7 @@ struct axis template struct vunits { - typedef Units type; + using type = Units; }; // Static parameters traits @@ -516,8 +516,8 @@ template struct datum_traits { static const bool is_specialized = false; - typedef void ellps_type; - typedef void def_type; + using ellps_type = void; + using def_type = void; }; #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_DATUM(NAME, ELLPS, DEF_T, DEF_V) \ @@ -549,7 +549,7 @@ struct ellps_traits static const bool is_specialized = false; template struct model_type { - typedef void type; + using type = void; }; }; @@ -560,7 +560,7 @@ struct ellps_traits > template struct model_type { // TODO: transform to spheroid or sphere - typedef typename spar::ellps::model_type type; + using type = typename spar::ellps::model_type; }; template @@ -651,7 +651,7 @@ template struct mode_traits { static const bool is_specialized = false; - typedef void type; + using type = void; }; #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_MODE(NAME) \ @@ -671,7 +671,7 @@ template struct orient_traits { static const bool is_specialized = false; - typedef void type; + using type = void; }; #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_ORIENT(NAME) \ @@ -689,14 +689,14 @@ template struct pm_traits { static const bool is_specialized = false; - typedef void type; + using type = void; }; template struct pm_traits > { static const bool is_specialized = true; - typedef T type; + using type = T; static T const& value(spar::pm const& p) { return p.value; } }; @@ -727,7 +727,7 @@ template struct proj_traits { static const bool is_specialized = false; - typedef void type; + using type = void; }; #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_PROJ(NAME) \ @@ -882,7 +882,7 @@ template struct sweep_traits { static const bool is_specialized = false; - typedef void type; + using type = void; }; #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_SWEEP(NAME) \ @@ -900,7 +900,7 @@ template struct units_traits { static const bool is_specialized = false; - typedef void type; + using type = void; }; #define BOOST_GEOMETRY_PROJECTIONS_DETAIL_REGISTER_UNITS(NAME) \ @@ -997,8 +997,8 @@ struct pick_proj_tag BOOST_GEOMETRY_STATIC_ASSERT((is_found), "Projection not named.", Tuple); - typedef proj_traits traits_type; - typedef typename traits_type::type type; + using traits_type = int; + using type = int; }; template @@ -1014,8 +1014,8 @@ struct pick_o_proj_tag BOOST_GEOMETRY_STATIC_ASSERT((is_found), "Expected o_proj parameter.", Tuple); - typedef proj_traits traits_type; - typedef typename traits_type::type type; + using traits_type = int; + using type = int; }; diff --git a/include/boost/geometry/srs/shared_grids.hpp b/include/boost/geometry/srs/shared_grids.hpp index 54bbb442a3..e38c83bad5 100644 --- a/include/boost/geometry/srs/shared_grids.hpp +++ b/include/boost/geometry/srs/shared_grids.hpp @@ -21,7 +21,7 @@ namespace srs { -typedef shared_grids_boost shared_grids; +using shared_grids = int; } // namespace srs diff --git a/include/boost/geometry/srs/shared_grids_boost.hpp b/include/boost/geometry/srs/shared_grids_boost.hpp index 06414ee572..c16f79021b 100644 --- a/include/boost/geometry/srs/shared_grids_boost.hpp +++ b/include/boost/geometry/srs/shared_grids_boost.hpp @@ -39,7 +39,7 @@ class shared_grids_boost return gridinfo.empty(); } - typedef projections::detail::shared_grids_tag tag; + using tag = int; struct read_locked { diff --git a/include/boost/geometry/srs/shared_grids_std.hpp b/include/boost/geometry/srs/shared_grids_std.hpp index d6f4061305..91094e324d 100644 --- a/include/boost/geometry/srs/shared_grids_std.hpp +++ b/include/boost/geometry/srs/shared_grids_std.hpp @@ -37,7 +37,7 @@ class shared_grids_std typedef std::shared_mutex mutex_type; // Other C++17 #elif !defined(BOOST_NO_CXX14_HDR_SHARED_MUTEX) && (__cplusplus > 201402L) - typedef std::shared_mutex mutex_type; + using mutex_type = int; #else typedef std::shared_timed_mutex mutex_type; #endif @@ -55,7 +55,7 @@ class shared_grids_std return gridinfo.empty(); } - typedef projections::detail::shared_grids_tag tag; + using tag = int; struct read_locked { diff --git a/include/boost/geometry/srs/sphere.hpp b/include/boost/geometry/srs/sphere.hpp index 9be5abf7ac..4d79ea63e5 100644 --- a/include/boost/geometry/srs/sphere.hpp +++ b/include/boost/geometry/srs/sphere.hpp @@ -82,19 +82,19 @@ namespace traits template struct tag< srs::sphere > { - typedef srs_sphere_tag type; + using type = int; }; template struct radius_type< srs::sphere > { - typedef RadiusType type; + using type = RadiusType; }; template struct radius_access, Dimension> { - typedef srs::sphere sphere_type; + using sphere_type = srs::sphere; static inline RadiusType get(sphere_type const& s) { diff --git a/include/boost/geometry/srs/spheroid.hpp b/include/boost/geometry/srs/spheroid.hpp index f8e5b51816..ded9fd0ace 100644 --- a/include/boost/geometry/srs/spheroid.hpp +++ b/include/boost/geometry/srs/spheroid.hpp @@ -121,19 +121,19 @@ namespace traits template struct tag< srs::spheroid > { - typedef srs_spheroid_tag type; + using type = int; }; template struct radius_type< srs::spheroid > { - typedef RadiusType type; + using type = RadiusType; }; template struct radius_access, Dimension> { - typedef srs::spheroid spheroid_type; + using spheroid_type = srs::spheroid; static inline RadiusType get(spheroid_type const& s) { diff --git a/include/boost/geometry/srs/transformation.hpp b/include/boost/geometry/srs/transformation.hpp index b327e11218..f1c7e1bf6a 100644 --- a/include/boost/geometry/srs/transformation.hpp +++ b/include/boost/geometry/srs/transformation.hpp @@ -95,14 +95,8 @@ struct transform_geometry_point { typedef typename geometry::point_type::type point_type; - typedef geometry::model::point - < - typename select_most_precise - < - typename geometry::coordinate_type::type, - CT - >::type, - geometry::dimension::type::value, + using type = int; +using dimension = int::type::value, typename geometry::coordinate_system::type > type; @@ -262,8 +256,8 @@ template > struct transform_geometry_wrapper { - typedef transform_geometry transform; - typedef OutGeometry type; + using transform = transform_geometry; + using type = OutGeometry; transform_geometry_wrapper(OutGeometry const& in, OutGeometry & out, bool input_angles) : m_out(out) @@ -405,7 +399,7 @@ struct transform transform_geometry_wrapper wrapper(in, out, input_angles); - typedef typename transform_geometry_wrapper::type point_type; + using point_type = typename transform_geometry_wrapper::type; point_type * ptr = boost::addressof(wrapper.get()); std::pair range = std::make_pair(ptr, ptr + 1); diff --git a/include/boost/geometry/strategies/agnostic/point_in_poly_oriented_winding.hpp b/include/boost/geometry/strategies/agnostic/point_in_poly_oriented_winding.hpp index 90321dac59..44f662fcb0 100644 --- a/include/boost/geometry/strategies/agnostic/point_in_poly_oriented_winding.hpp +++ b/include/boost/geometry/strategies/agnostic/point_in_poly_oriented_winding.hpp @@ -57,12 +57,7 @@ template > class oriented_winding { - typedef typename select_calculation_type - < - Point, - PointOfSegment, - CalculationType - >::type calculation_type; + using calculation_type = int; using strategy_side_type = typename strategy::side::services::default_strategy @@ -161,9 +156,9 @@ class oriented_winding public : // Typedefs and static methods to fulfill the concept - typedef Point point_type; - typedef PointOfSegment segment_point_type; - typedef counter state_type; + using point_type = Point; + using segment_point_type = PointOfSegment; + using state_type = counter; static inline bool apply(Point const& point, PointOfSegment const& s1, PointOfSegment const& s2, diff --git a/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp b/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp index b7400d8523..02bea46ca3 100644 --- a/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp +++ b/include/boost/geometry/strategies/agnostic/point_in_poly_winding.hpp @@ -107,10 +107,7 @@ class winding Point, PointOfSegment, CalculationType >::type { - typedef typename within::detail::winding_base_type - < - Point, PointOfSegment, CalculationType - >::type base_t; + using base_t = int; public: winding() {} diff --git a/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp b/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp index ae98c80df7..c9fd9cba84 100644 --- a/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp +++ b/include/boost/geometry/strategies/agnostic/simplify_douglas_peucker.hpp @@ -59,7 +59,7 @@ class douglas_peucker { public : - typedef PointDistanceStrategy distance_strategy_type; + using distance_strategy_type = PointDistanceStrategy; typedef typename strategy::distance::services::return_type < diff --git a/include/boost/geometry/strategies/cartesian/azimuth.hpp b/include/boost/geometry/strategies/cartesian/azimuth.hpp index 9035fdddcb..fdce505c22 100644 --- a/include/boost/geometry/strategies/cartesian/azimuth.hpp +++ b/include/boost/geometry/strategies/cartesian/azimuth.hpp @@ -69,7 +69,7 @@ class cartesian T2 const& x2, T2 const& y2, Result& a1, Result& a2) { - typedef typename result_type::type calc_t; + using calc_t = typename result_type::type; // NOTE: azimuth 0 is at Y axis, increasing right // as in spherical/geographic where 0 is at North axis @@ -85,7 +85,7 @@ namespace services template <> struct default_strategy { - typedef strategy::azimuth::cartesian<> type; + using type = int; }; } diff --git a/include/boost/geometry/strategies/cartesian/box_in_box.hpp b/include/boost/geometry/strategies/cartesian/box_in_box.hpp index 91127b13e1..879fe2fccb 100644 --- a/include/boost/geometry/strategies/cartesian/box_in_box.hpp +++ b/include/boost/geometry/strategies/cartesian/box_in_box.hpp @@ -97,13 +97,9 @@ struct box_longitude_range BoxContainingValue const& bing_min, BoxContainingValue const& bing_max) { - typedef typename select_most_precise - < - BoxContainedValue, - BoxContainingValue - >::type calc_t; + using calc_t = int; typedef typename geometry::detail::cs_angular_units::type units_t; - typedef math::detail::constants_on_spheroid constants; + using constants = int; if (CoordCheck::apply(bed_min, bed_max, bing_min, bing_max)) { @@ -308,7 +304,7 @@ struct default_strategy cartesian_tag, cartesian_tag > { - typedef cartesian_box_box type; + using type = cartesian_box_box; }; // spherical_equatorial_tag, spherical_polar_tag and geographic_cat are casted to spherical_tag @@ -339,7 +335,7 @@ struct default_strategy cartesian_tag, cartesian_tag > { - typedef cartesian_box_box type; + using type = cartesian_box_box; }; // spherical_equatorial_tag, spherical_polar_tag and geographic_cat are casted to spherical_tag diff --git a/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp b/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp index fd52eb2596..2b0cb345fc 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_end_round.hpp @@ -91,7 +91,7 @@ private : template static inline T calculate_angle(P1 const& from_point, P2 const& to_point) { - typedef P1 vector_type; + using vector_type = P1; vector_type v = from_point; geometry::subtract_point(v, to_point); return atan2(geometry::get<1>(v), geometry::get<0>(v)); @@ -118,7 +118,7 @@ public : RangeOut& range_out) const { boost::ignore_unused(perp_left_point); - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; typedef typename geometry::select_most_precise < diff --git a/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp b/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp index a47b3fa018..b817d90fb9 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_join_miter.hpp @@ -77,7 +77,7 @@ class join_miter return false; } - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; typedef typename geometry::select_most_precise < coordinate_type, diff --git a/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp b/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp index 95553685cb..cfa29e2584 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_join_round.hpp @@ -128,7 +128,7 @@ public : DistanceType const& buffer_distance, RangeOut& range_out) const { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; typedef typename boost::range_value::type output_point_type; typedef typename geometry::select_most_precise 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 0a2c7ebf63..f86b1a56ca 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,7 +85,7 @@ public : DistanceType const& buffer_distance, RangeOut& range_out) const { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; typedef typename geometry::select_most_precise < diff --git a/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp b/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp index 10dac42983..11aadd62f7 100644 --- a/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp +++ b/include/boost/geometry/strategies/cartesian/buffer_side_straight.hpp @@ -66,7 +66,7 @@ public : DistanceStrategy const& distance, OutputRange& output_range) { - typedef typename coordinate_type::type coordinate_type; + using coordinate_type = int; typedef typename geometry::select_most_precise < coordinate_type, diff --git a/include/boost/geometry/strategies/cartesian/centroid_average.hpp b/include/boost/geometry/strategies/cartesian/centroid_average.hpp index 5b642a7f49..5a970fa3d3 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_average.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_average.hpp @@ -71,7 +71,7 @@ public : template struct state_type { - typedef sum type; + using type = sum; }; template @@ -115,11 +115,7 @@ struct default_strategy Geometry > { - typedef average - < - Point, - point_type_t - > type; + using type = int; }; } // namespace services diff --git a/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp b/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp index 8e4c014a48..294e82445a 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_bashein_detmer.hpp @@ -146,7 +146,7 @@ private : template class sums { - typedef typename calculation_type::type calc_type; + using calc_type = typename calculation_type::type; friend class bashein_detmer; std::size_t count; @@ -167,7 +167,7 @@ public : template struct state_type { - typedef sums type; + using type = sums; }; template @@ -185,7 +185,7 @@ public : return POINT(sum_x / (3 * sum_a2), sum_y / (3 * sum_a2) ) */ - typedef typename calculation_type::type calc_type; + using calc_type = typename calculation_type::type; // Get coordinates and promote them to calculation_type calc_type const x1 = util::numeric_cast(get<0>(p1)); @@ -203,7 +203,7 @@ public : static inline bool result(sums const& state, ResultPoint& centroid) { - typedef typename calculation_type::type calc_type; + using calc_type = typename calculation_type::type; calc_type const zero = calc_type(); if (state.count > 0 && ! math::equals(state.sum_a2, zero)) @@ -244,11 +244,7 @@ namespace services template struct default_strategy { - typedef bashein_detmer - < - Point, - point_type_t - > type; + using type = int; }; diff --git a/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp b/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp index 6e8595881a..50eab8a606 100644 --- a/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp +++ b/include/boost/geometry/strategies/cartesian/centroid_weighted_length.hpp @@ -50,17 +50,14 @@ template class weighted_length { private : - typedef geometry::strategy::distance::pythagoras pythagoras_strategy; + using pythagoras_strategy = int; template struct calculation_type { // Below the distance between two GeometryPoints is calculated. // ResultPoint is taken into account by passing them together here. - typedef typename pythagoras_strategy::template calculation_type - < - GeometryPoint, ResultPoint - >::type type; + using type = int; }; template @@ -69,7 +66,7 @@ private : friend class weighted_length; template friend struct set_sum_div_length; - typedef typename calculation_type::type calc_type; + using calc_type = typename calculation_type::type; typedef typename geometry::model::point < calc_type, @@ -92,14 +89,14 @@ public : template struct state_type { - typedef sums type; + using type = sums; }; template static inline void apply(GeometryPoint const& p1, GeometryPoint const& p2, sums& state) { - typedef typename calculation_type::type distance_type; + using distance_type = typename calculation_type::type; distance_type const d = pythagoras_strategy::apply(p1, p2); state.length += d; @@ -118,7 +115,7 @@ public : static inline bool result(sums const& state, ResultPoint& centroid) { - typedef typename calculation_type::type distance_type; + using distance_type = typename calculation_type::type; distance_type const zero = distance_type(); if (! geometry::math::equals(state.length, zero) @@ -162,11 +159,7 @@ struct default_strategy Geometry > { - typedef weighted_length - < - Point, - point_type_t - > type; + using type = int; }; diff --git a/include/boost/geometry/strategies/cartesian/densify.hpp b/include/boost/geometry/strategies/cartesian/densify.hpp index 4d18e1f0cf..6fb3e0062b 100644 --- a/include/boost/geometry/strategies/cartesian/densify.hpp +++ b/include/boost/geometry/strategies/cartesian/densify.hpp @@ -53,15 +53,11 @@ class cartesian 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 - < - typename coordinate_type::type, out_coord_t, - CalculationType - >::type calc_t; + using out_point_t = typename AssignPolicy::point_type; + using out_coord_t = int; + using calc_t = int; - typedef model::point::value, cs::cartesian> calc_point_t; + using value = int, cs::cartesian> calc_point_t; assert_dimension_equal(); @@ -113,7 +109,7 @@ namespace services template <> struct default_strategy { - typedef strategy::densify::cartesian<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/cartesian/disjoint_box_box.hpp b/include/boost/geometry/strategies/cartesian/disjoint_box_box.hpp index 706c93ec79..3cb1804dc0 100644 --- a/include/boost/geometry/strategies/cartesian/disjoint_box_box.hpp +++ b/include/boost/geometry/strategies/cartesian/disjoint_box_box.hpp @@ -96,7 +96,7 @@ namespace services template struct default_strategy { - typedef disjoint::cartesian_box_box type; + using type = disjoint::cartesian_box_box; }; diff --git a/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp b/include/boost/geometry/strategies/cartesian/disjoint_segment_box.hpp index 39ebe395c3..2555b093a2 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 = int; + using point_coordinate_type = int; RelativeDistance c_p0 = util::numeric_cast < @@ -245,7 +242,7 @@ struct disjoint_segment_box_impl // other strategies that are used are intersection and covered_by strategies. struct segment_box { - typedef covered_by::cartesian_point_box disjoint_point_box_strategy_type; + using disjoint_point_box_strategy_type = int; static inline disjoint_point_box_strategy_type get_disjoint_point_box_strategy() { @@ -285,7 +282,7 @@ namespace services template struct default_strategy { - typedef disjoint::segment_box type; + using type = disjoint::segment_box; }; template diff --git a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp index e3396494aa..67b3731efe 100644 --- a/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_projected_point.hpp @@ -103,7 +103,7 @@ class projected_point { assert_dimension_equal(); - typedef typename calculation_type::type calculation_type; + using calculation_type = typename calculation_type::type; auto closest_point = closest_points::detail::compute_closest_point_to_segment ::apply(p, p1, p2); @@ -126,7 +126,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_segment type; + using type = int; }; @@ -142,21 +142,14 @@ struct comparable_type > { // Define a projected_point strategy with its underlying point-point-strategy // being comparable - typedef projected_point - < - CalculationType, - typename comparable_type::type - > type; + using type = int; }; template struct get_comparable > { - typedef typename comparable_type - < - projected_point - >::type comparable_type; + using comparable_type = int; public : static inline comparable_type apply(projected_point const& ) { @@ -169,7 +162,7 @@ template struct result_from_distance, P, PS> { private : - typedef typename return_type, P, PS>::type return_type; + using return_type = int; public : template static inline return_type apply(projected_point const& , T const& value) diff --git a/include/boost/geometry/strategies/cartesian/distance_projected_point_ax.hpp b/include/boost/geometry/strategies/cartesian/distance_projected_point_ax.hpp index 0128669f19..b73aefcce0 100644 --- a/include/boost/geometry/strategies/cartesian/distance_projected_point_ax.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_projected_point_ax.hpp @@ -62,7 +62,7 @@ namespace detail template struct projected_point_ax_result { - typedef T value_type; + using value_type = T; projected_point_ax_result(T const& c = T(0)) : atd(c), xtd(c) @@ -97,7 +97,7 @@ class projected_point_ax_less { //return left.xtd < right.xtd && right.atd < m_max_distance.atd; - typedef typename Distance::value_type value_type; + using value_type = typename Distance::value_type; value_type const lx = left.xtd > m_max_distance.xtd ? left.xtd - m_max_distance.xtd : 0; value_type const rx = right.xtd > m_max_distance.xtd ? right.xtd - m_max_distance.xtd : 0; @@ -148,10 +148,7 @@ public : template struct result_type { - typedef projected_point_ax_result - < - typename calculation_type::type - > type; + using type = projected_point_ax_result::type>; }; public : @@ -162,19 +159,15 @@ public : { assert_dimension_equal(); - typedef typename calculation_type::type calculation_type; + using calculation_type = typename calculation_type::type; // A projected point of points in Integer coordinates must be able to be // represented in FP. - typedef model::point - < - calculation_type, - dimension::value, - typename coordinate_system::type + using type = int > fp_point_type; // For convenience - typedef fp_point_type fp_vector_type; + using fp_vector_type = int; /* Algorithm [p: (px,py), p1: (x1,y1), p2: (x2,y2)] @@ -246,15 +239,14 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_segment type; + using type = int; }; template struct return_type, P, PS> { - typedef typename detail::projected_point_ax - ::template result_type::type type; + using type = typename detail::projected_point_ax::template result_type::type; }; @@ -263,21 +255,14 @@ struct comparable_type > { // Define a projected_point strategy with its underlying point-point-strategy // being comparable - typedef detail::projected_point_ax - < - CalculationType, - typename comparable_type::type - > type; + using type = int; }; template struct get_comparable > { - typedef typename comparable_type - < - detail::projected_point_ax - >::type comparable_type; + using comparable_type = int; public : static inline comparable_type apply(detail::projected_point_ax const& ) { @@ -290,7 +275,7 @@ template struct result_from_distance, P, PS> { private : - typedef typename return_type, P, PS>::type return_type; + using return_type = int; public : template static inline return_type apply(detail::projected_point_ax const& , T const& value) diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp index c7e77bb1db..63e0d110b4 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras.hpp @@ -180,7 +180,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -193,14 +193,14 @@ struct return_type, P1, P2> template struct comparable_type > { - typedef comparable::pythagoras type; + using type = comparable::pythagoras; }; template struct get_comparable > { - typedef comparable::pythagoras comparable_type; + using comparable_type = comparable::pythagoras; public : static inline comparable_type apply(pythagoras const& ) { @@ -213,7 +213,7 @@ template struct result_from_distance, Point1, Point2> { private : - typedef typename return_type, Point1, Point2>::type return_type; + using return_type = typename return_type, Point1, Point2>::type; public : template static inline return_type apply(pythagoras const& , T const& value) @@ -227,7 +227,7 @@ public : template struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -242,14 +242,14 @@ struct return_type, P1, P2> template struct comparable_type > { - typedef comparable::pythagoras type; + using type = comparable::pythagoras; }; template struct get_comparable > { - typedef comparable::pythagoras comparable_type; + using comparable_type = comparable::pythagoras; public : static inline comparable_type apply(comparable::pythagoras const& ) { @@ -262,7 +262,7 @@ template struct result_from_distance, Point1, Point2> { private : - typedef typename return_type, Point1, Point2>::type return_type; + using return_type = typename return_type, Point1, Point2>::type; public : template static inline return_type apply(comparable::pythagoras const& , T const& value) @@ -279,7 +279,7 @@ struct default_strategy point_tag, point_tag, Point1, Point2, cartesian_tag, cartesian_tag > { - typedef pythagoras<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp index ea8f8d6b0a..7d3c19cd91 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras_box_box.hpp @@ -209,7 +209,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_box_box type; + using type = int; }; @@ -222,14 +222,14 @@ struct return_type, Box1, Box2> template struct comparable_type > { - typedef comparable::pythagoras_box_box type; + using type = comparable::pythagoras_box_box; }; template struct get_comparable > { - typedef comparable::pythagoras_box_box comparable_type; + using comparable_type = comparable::pythagoras_box_box; public : static inline comparable_type apply(pythagoras_box_box const& ) @@ -243,10 +243,7 @@ template struct result_from_distance, Box1, Box2> { private: - typedef typename return_type - < - pythagoras_box_box, Box1, Box2 - >::type return_type; + using return_type = typename return_type, Box1, Box2>::type; public: template static inline return_type @@ -261,7 +258,7 @@ struct result_from_distance, Box1, Box2> template struct tag > { - typedef strategy_tag_distance_box_box type; + using type = int; }; @@ -279,14 +276,14 @@ struct return_type, Box1, Box2> template struct comparable_type > { - typedef comparable::pythagoras_box_box type; + using type = comparable::pythagoras_box_box; }; template struct get_comparable > { - typedef comparable::pythagoras_box_box comparable_type; + using comparable_type = comparable::pythagoras_box_box; public : static inline comparable_type apply(comparable_type const& ) { @@ -302,10 +299,7 @@ struct result_from_distance > { private : - typedef typename return_type - < - comparable::pythagoras_box_box, Box1, Box2 - >::type return_type; + using return_type = typename return_type, Box1, Box2>::type; public : template static inline return_type @@ -324,7 +318,7 @@ struct default_strategy box_tag, box_tag, BoxPoint1, BoxPoint2, cartesian_tag, cartesian_tag > { - typedef pythagoras_box_box<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp b/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp index 9d1b0949fa..e5b0d9ea99 100644 --- a/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_pythagoras_point_box.hpp @@ -204,7 +204,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_box type; + using type = int; }; @@ -220,14 +220,14 @@ struct return_type, Point, Box> template struct comparable_type > { - typedef comparable::pythagoras_point_box type; + using type = comparable::pythagoras_point_box; }; template struct get_comparable > { - typedef comparable::pythagoras_point_box comparable_type; + using comparable_type = comparable::pythagoras_point_box; public : static inline comparable_type apply(pythagoras_point_box const& ) @@ -241,10 +241,7 @@ template struct result_from_distance, Point, Box> { private : - typedef typename return_type - < - pythagoras_point_box, Point, Box - >::type return_type; + using return_type = typename return_type, Point, Box>::type; public : template static inline return_type @@ -259,7 +256,7 @@ public : template struct tag > { - typedef strategy_tag_distance_point_box type; + using type = int; }; @@ -279,14 +276,14 @@ struct return_type template struct comparable_type > { - typedef comparable::pythagoras_point_box type; + using type = comparable::pythagoras_point_box; }; template struct get_comparable > { - typedef comparable::pythagoras_point_box comparable_type; + using comparable_type = comparable::pythagoras_point_box; public : static inline comparable_type apply(comparable_type const& ) { @@ -302,10 +299,7 @@ struct result_from_distance > { private : - typedef typename return_type - < - comparable::pythagoras_point_box, Point, Box - >::type return_type; + using return_type = typename return_type, Point, Box>::type; public : template static inline return_type @@ -324,7 +318,7 @@ struct default_strategy point_tag, box_tag, Point, BoxPoint, cartesian_tag, cartesian_tag > { - typedef pythagoras_point_box<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/cartesian/distance_segment_box.hpp b/include/boost/geometry/strategies/cartesian/distance_segment_box.hpp index ab3aab7262..0e2470e08d 100644 --- a/include/boost/geometry/strategies/cartesian/distance_segment_box.hpp +++ b/include/boost/geometry/strategies/cartesian/distance_segment_box.hpp @@ -45,7 +45,7 @@ struct cartesian_segment_box > {}; - typedef cartesian_tag cs_tag; + using cs_tag = int; template < @@ -91,7 +91,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_segment_box type; + using type = int; }; template @@ -104,21 +104,14 @@ struct comparable_type > { // Define a cartesian_segment_box strategy with its underlying point-point // strategy being comparable - typedef cartesian_segment_box - < - CalculationType, - typename comparable_type::type - > type; + using type = int; }; template struct get_comparable > { - typedef typename comparable_type - < - cartesian_segment_box - >::type comparable_type; + using comparable_type = int; public : static inline comparable_type apply(cartesian_segment_box const& ) { @@ -130,15 +123,7 @@ template struct result_from_distance, PS, PB> { private : - typedef typename return_type< - cartesian_segment_box - < - CalculationType, - Strategy - >, - PS, - PB - >::type return_type; + using return_type = int; public : template static inline return_type apply(cartesian_segment_box { - typedef cartesian_segment_box<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/cartesian/intersection.hpp b/include/boost/geometry/strategies/cartesian/intersection.hpp index d6fc5c9bbf..d295558756 100644 --- a/include/boost/geometry/strategies/cartesian/intersection.hpp +++ b/include/boost/geometry/strategies/cartesian/intersection.hpp @@ -123,16 +123,13 @@ template > struct cartesian_segments { - typedef cartesian_tag cs_tag; + using cs_tag = int; template struct segment_intersection_info { private : - typedef typename select_most_precise - < - CoordinateType, double - >::type promoted_type; + using promoted_type = int; promoted_type comparable_length_a() const { @@ -165,7 +162,7 @@ struct cartesian_segments // results in an integer which rounds to the nearest integer. BOOST_GEOMETRY_ASSERT(ratio.denominator() != typename SegmentRatio::int_type(0)); - typedef typename promote_integral::type calc_type; + using calc_type = int; calc_type const numerator = util::numeric_cast(ratio.numerator()); @@ -284,8 +281,8 @@ struct cartesian_segments UniqueSubRange2 const& range_q, Policy const& policy) { - 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; BOOST_CONCEPT_ASSERT( (concepts::ConstPoint) ); BOOST_CONCEPT_ASSERT( (concepts::ConstPoint) ); @@ -301,7 +298,7 @@ struct cartesian_segments typename geometry::coordinate_type::type >::type coordinate_type; - typedef segment_ratio ratio_type; + using ratio_type = int; segment_intersection_info < typename select_calculation_type::type, @@ -361,8 +358,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); @@ -738,7 +735,7 @@ namespace services template struct default_strategy { - typedef cartesian_segments type; + using type = cartesian_segments; }; } // namespace services @@ -756,7 +753,7 @@ namespace within { namespace services template struct default_strategy { - typedef strategy::intersection::cartesian_segments<> type; + using type = int; }; template @@ -785,7 +782,7 @@ namespace covered_by { namespace services template struct default_strategy { - typedef strategy::intersection::cartesian_segments<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/cartesian/line_interpolate.hpp b/include/boost/geometry/strategies/cartesian/line_interpolate.hpp index a63cb85488..99a2974155 100644 --- a/include/boost/geometry/strategies/cartesian/line_interpolate.hpp +++ b/include/boost/geometry/strategies/cartesian/line_interpolate.hpp @@ -55,11 +55,8 @@ class cartesian Point & p, Distance const&) const { - typedef typename select_calculation_type_alt - < - CalculationType, Point - >::type calc_t; - typedef typename coordinate_type::type coord_t; + using calc_t = int; + using coord_t = int; //segment convex combination: p0*fraction + p1*(1-fraction) Fraction const one_minus_fraction = 1-fraction; @@ -84,7 +81,7 @@ namespace services template <> struct default_strategy { - typedef strategy::line_interpolate::cartesian<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/cartesian/point_in_box.hpp b/include/boost/geometry/strategies/cartesian/point_in_box.hpp index 468e167c60..b45b5a1c3c 100644 --- a/include/boost/geometry/strategies/cartesian/point_in_box.hpp +++ b/include/boost/geometry/strategies/cartesian/point_in_box.hpp @@ -102,12 +102,9 @@ struct longitude_range template static inline bool apply(Value1 const& value, Value2 const& min_value, Value2 const& max_value) { - typedef typename select_most_precise - < - Value1, Value2 - >::type calc_t; + using calc_t = int; typedef typename geometry::detail::cs_angular_units::type units_t; - typedef math::detail::constants_on_spheroid constants; + using constants = int; if (CoordCheck::apply(value, min_value, max_value)) { @@ -234,7 +231,7 @@ struct default_strategy cartesian_tag, cartesian_tag > { - typedef within::cartesian_point_box type; + using type = within::cartesian_point_box; }; // spherical_equatorial_tag, spherical_polar_tag and geographic_cat are casted to spherical_tag @@ -302,7 +299,7 @@ struct default_strategy cartesian_tag, cartesian_tag > { - typedef covered_by::cartesian_point_box type; + using type = covered_by::cartesian_point_box; }; // spherical_equatorial_tag, spherical_polar_tag and geographic_cat are casted to spherical_tag diff --git a/include/boost/geometry/strategies/cartesian/point_in_point.hpp b/include/boost/geometry/strategies/cartesian/point_in_point.hpp index fe1713638e..0c03932016 100644 --- a/include/boost/geometry/strategies/cartesian/point_in_point.hpp +++ b/include/boost/geometry/strategies/cartesian/point_in_point.hpp @@ -76,7 +76,7 @@ namespace strategy { namespace within struct cartesian_point_point { - typedef cartesian_tag cs_tag; + using cs_tag = int; template static inline bool apply(Point1 const& point1, Point2 const& point2) @@ -96,7 +96,7 @@ namespace services template struct default_strategy { - typedef strategy::within::cartesian_point_point type; + using type = strategy::within::cartesian_point_point; }; } // namespace services @@ -113,7 +113,7 @@ namespace strategy { namespace covered_by { namespace services template struct default_strategy { - typedef strategy::within::cartesian_point_point type; + using type = strategy::within::cartesian_point_point; }; }}} // namespace strategy::covered_by::services diff --git a/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp b/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp index dda6dc0ad9..146e708839 100644 --- a/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp +++ b/include/boost/geometry/strategies/cartesian/point_in_poly_crossings_multiply.hpp @@ -80,14 +80,14 @@ class crossings_multiply public : - typedef flags state_type; + using state_type = flags; template static inline bool apply(Point const& point, PointOfSegment const& seg1, PointOfSegment const& seg2, flags& state) { - typedef typename calculation_type::type calc_t; + using calc_t = typename calculation_type::type; calc_t const tx = get<0>(point); calc_t const ty = get<1>(point); diff --git a/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp b/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp index 3ca8d241d2..01336d9ff6 100644 --- a/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp +++ b/include/boost/geometry/strategies/cartesian/point_in_poly_franklin.hpp @@ -80,14 +80,14 @@ class franklin public : - typedef crossings state_type; + using state_type = crossings; template static inline bool apply(Point const& point, PointOfSegment const& seg1, PointOfSegment const& seg2, crossings& state) { - typedef typename calculation_type::type calc_t; + using calc_t = typename calculation_type::type; calc_t const& px = get<0>(point); calc_t const& py = get<1>(point); diff --git a/include/boost/geometry/strategies/cartesian/point_in_poly_winding.hpp b/include/boost/geometry/strategies/cartesian/point_in_poly_winding.hpp index 325af9e3e9..223cebdbe5 100644 --- a/include/boost/geometry/strategies/cartesian/point_in_poly_winding.hpp +++ b/include/boost/geometry/strategies/cartesian/point_in_poly_winding.hpp @@ -83,10 +83,10 @@ class cartesian_winding_base }; public: - typedef cartesian_tag cs_tag; + using cs_tag = int; // Typedefs and static methods to fulfill the concept - typedef counter state_type; + using state_type = counter; template static inline bool apply(Point const& point, @@ -158,7 +158,7 @@ class cartesian_winding_base counter& state, bool& eq1, bool& eq2) { - typedef typename calculation_type::type calc_t; + using calc_t = typename calculation_type::type; calc_t const px = get<0>(point); calc_t const s1x = get<0>(seg1); @@ -189,7 +189,7 @@ class cartesian_winding_base PointOfSegment const& seg2, bool eq1, bool eq2) { - typedef typename calculation_type::type calc_t; + using calc_t = typename calculation_type::type; calc_t const p = get<0>(point); calc_t const s1 = get<0>(seg1); diff --git a/include/boost/geometry/strategies/cartesian/point_order.hpp b/include/boost/geometry/strategies/cartesian/point_order.hpp index 995147daaa..35360b1897 100644 --- a/include/boost/geometry/strategies/cartesian/point_order.hpp +++ b/include/boost/geometry/strategies/cartesian/point_order.hpp @@ -27,7 +27,7 @@ template struct cartesian : strategy::area::cartesian { - typedef area_tag version_tag; + using version_tag = int; // TEMP static strategy::area::cartesian get_area_strategy() @@ -42,7 +42,7 @@ namespace services template <> struct default_strategy { - typedef cartesian<> type; + using type = int; }; } // namespace services diff --git a/include/boost/geometry/strategies/centroid.hpp b/include/boost/geometry/strategies/centroid.hpp index 6ee2b49e7a..b576fd6a90 100644 --- a/include/boost/geometry/strategies/centroid.hpp +++ b/include/boost/geometry/strategies/centroid.hpp @@ -59,7 +59,7 @@ template > struct default_strategy { - typedef not_applicable_strategy type; + using type = not_applicable_strategy; }; diff --git a/include/boost/geometry/strategies/comparable_distance_result.hpp b/include/boost/geometry/strategies/comparable_distance_result.hpp index 46c9550c29..430d36f7fb 100644 --- a/include/boost/geometry/strategies/comparable_distance_result.hpp +++ b/include/boost/geometry/strategies/comparable_distance_result.hpp @@ -49,7 +49,7 @@ struct comparable_distance_strategy2_type template struct comparable_distance_strategy2_type { - typedef Strategy type; + using type = Strategy; }; template diff --git a/include/boost/geometry/strategies/concepts/area_concept.hpp b/include/boost/geometry/strategies/concepts/area_concept.hpp index da983bac57..6edb33ce09 100644 --- a/include/boost/geometry/strategies/concepts/area_concept.hpp +++ b/include/boost/geometry/strategies/concepts/area_concept.hpp @@ -40,10 +40,10 @@ class AreaStrategy #ifndef DOXYGEN_NO_CONCEPT_MEMBERS // 1) must define state template, - typedef typename Strategy::template state state_type; + using state_type = typename Strategy::template state; // 2) must define result_type template, - typedef typename Strategy::template result_type::type return_type; + using return_type = typename Strategy::template result_type::type; struct check_methods { diff --git a/include/boost/geometry/strategies/concepts/centroid_concept.hpp b/include/boost/geometry/strategies/concepts/centroid_concept.hpp index 9a1dcbcc95..4fb5e5e868 100644 --- a/include/boost/geometry/strategies/concepts/centroid_concept.hpp +++ b/include/boost/geometry/strategies/concepts/centroid_concept.hpp @@ -33,13 +33,13 @@ class CentroidStrategy #ifndef DOXYGEN_NO_CONCEPT_MEMBERS // 1) must define state_type, - typedef typename Strategy::state_type state_type; + using state_type = typename Strategy::state_type; // 2) must define point_type, - typedef typename Strategy::point_type point_type; + using point_type = typename Strategy::point_type; // 3) must define point_type, of polygon (segments) - typedef typename Strategy::segment_point_type spoint_type; + using spoint_type = typename Strategy::segment_point_type; struct check_methods { diff --git a/include/boost/geometry/strategies/concepts/convex_hull_concept.hpp b/include/boost/geometry/strategies/concepts/convex_hull_concept.hpp index d4295ce47b..59c742a888 100644 --- a/include/boost/geometry/strategies/concepts/convex_hull_concept.hpp +++ b/include/boost/geometry/strategies/concepts/convex_hull_concept.hpp @@ -39,13 +39,13 @@ class ConvexHullStrategy #ifndef DOXYGEN_NO_CONCEPT_MEMBERS // 1) must define state_type - typedef typename Strategy::state_type state_type; + using state_type = typename Strategy::state_type; // 2) must define point_type - typedef typename Strategy::point_type point_type; + using point_type = typename Strategy::point_type; // 3) must define geometry_type - typedef typename Strategy::geometry_type geometry_type; + using geometry_type = typename Strategy::geometry_type; struct check_methods { diff --git a/include/boost/geometry/strategies/concepts/distance_concept.hpp b/include/boost/geometry/strategies/concepts/distance_concept.hpp index c14e4e3bc2..248a54f6b0 100644 --- a/include/boost/geometry/strategies/concepts/distance_concept.hpp +++ b/include/boost/geometry/strategies/concepts/distance_concept.hpp @@ -59,15 +59,9 @@ private : static void apply(ApplyMethod) { // 1: inspect and define both arguments of apply - typedef typename parameter_type_of - < - ApplyMethod, 0 - >::type ptype1; + using ptype1 = int; - typedef typename parameter_type_of - < - ApplyMethod, 1 - >::type ptype2; + using ptype2 = int; // 2) must define meta-function "return_type" typedef typename strategy::distance::services::return_type @@ -148,15 +142,9 @@ private : static void apply(ApplyMethod) { // 1) inspect and define both arguments of apply - typedef typename parameter_type_of - < - ApplyMethod, 0 - >::type ptype; + using ptype = int; - typedef typename parameter_type_of - < - ApplyMethod, 1 - >::type sptype; + using sptype = int; namespace services = strategy::distance::services; // 2) must define meta-function "tag" diff --git a/include/boost/geometry/strategies/concepts/segment_intersect_concept.hpp b/include/boost/geometry/strategies/concepts/segment_intersect_concept.hpp index 87d901eb93..dfb81ac598 100644 --- a/include/boost/geometry/strategies/concepts/segment_intersect_concept.hpp +++ b/include/boost/geometry/strategies/concepts/segment_intersect_concept.hpp @@ -34,14 +34,14 @@ class SegmentIntersectStrategy #ifndef DOXYGEN_NO_CONCEPT_MEMBERS // 1) must define return_type - typedef typename Strategy::return_type return_type; + using return_type = typename Strategy::return_type; // 2) must define point_type (of segment points) //typedef typename Strategy::point_type point_type; // 3) must define segment_type 1 and 2 (of segment points) - typedef typename Strategy::segment_type1 segment_type1; - typedef typename Strategy::segment_type2 segment_type2; + using segment_type1 = typename Strategy::segment_type1; + using segment_type2 = typename Strategy::segment_type2; struct check_methods diff --git a/include/boost/geometry/strategies/concepts/simplify_concept.hpp b/include/boost/geometry/strategies/concepts/simplify_concept.hpp index 01f7a7510c..caf4e7f129 100644 --- a/include/boost/geometry/strategies/concepts/simplify_concept.hpp +++ b/include/boost/geometry/strategies/concepts/simplify_concept.hpp @@ -45,7 +45,7 @@ private : // 1) must define distance_strategy_type, // defining point-segment distance strategy (to be checked) - typedef typename Strategy::distance_strategy_type ds_type; + using ds_type = typename Strategy::distance_strategy_type; struct checker @@ -59,9 +59,7 @@ private : ApplyMethod >::type parameter_types; - typedef std::conditional_t - < - ft::is_member_function_pointer::value, + using value = int, std::integral_constant, std::integral_constant > base_index; diff --git a/include/boost/geometry/strategies/concepts/within_concept.hpp b/include/boost/geometry/strategies/concepts/within_concept.hpp index d296fc513a..3691c81468 100644 --- a/include/boost/geometry/strategies/concepts/within_concept.hpp +++ b/include/boost/geometry/strategies/concepts/within_concept.hpp @@ -96,27 +96,18 @@ class WithinStrategyPolygonal typedef typename geometry::point_type::type point_of_segment; // 0) - typedef typename concepts::detail::relate_strategy_dispatch - < - Point, Polygonal, Strategy - >::type strategy_type; + using strategy_type = typename concepts::detail::relate_strategy_dispatch::type; // 1) must define state_type - typedef typename strategy_type::state_type state_type; + using state_type = typename strategy_type::state_type; struct checker { template static void apply(ApplyMethod, ResultMethod) { - typedef typename parameter_type_of - < - ApplyMethod, 0 - >::type point_type; - typedef typename parameter_type_of - < - ApplyMethod, 1 - >::type segment_point_type; + using point_type = int; + using segment_point_type = int; // CHECK: apply-arguments should both fulfill point concept BOOST_CONCEPT_ASSERT @@ -179,24 +170,15 @@ class WithinStrategyPointBox #ifndef DOXYGEN_NO_CONCEPT_MEMBERS // 0) - typedef typename concepts::detail::within_strategy_dispatch - < - Point, Box, Strategy - >::type strategy_type; + using strategy_type = typename concepts::detail::within_strategy_dispatch::type; struct checker { template static void apply(ApplyMethod) { - typedef typename parameter_type_of - < - ApplyMethod, 0 - >::type point_type; - typedef typename parameter_type_of - < - ApplyMethod, 1 - >::type box_type; + using point_type = int; + using box_type = int; // CHECK: apply-arguments should fulfill point/box concept BOOST_CONCEPT_ASSERT @@ -258,14 +240,8 @@ class WithinStrategyBoxBox template static void apply(ApplyMethod const&) { - typedef typename parameter_type_of - < - ApplyMethod, 0 - >::type box_type1; - typedef typename parameter_type_of - < - ApplyMethod, 1 - >::type box_type2; + using box_type1 = int; + using box_type2 = int; // CHECK: apply-arguments should both fulfill box concept BOOST_CONCEPT_ASSERT diff --git a/include/boost/geometry/strategies/convex_hull.hpp b/include/boost/geometry/strategies/convex_hull.hpp index ff1a9ed347..597d59da30 100644 --- a/include/boost/geometry/strategies/convex_hull.hpp +++ b/include/boost/geometry/strategies/convex_hull.hpp @@ -44,7 +44,7 @@ template > struct strategy_convex_hull { - typedef strategy::not_implemented type; + using type = int; }; diff --git a/include/boost/geometry/strategies/detail.hpp b/include/boost/geometry/strategies/detail.hpp index 1b723fc6e7..6ec51c77cf 100644 --- a/include/boost/geometry/strategies/detail.hpp +++ b/include/boost/geometry/strategies/detail.hpp @@ -47,7 +47,7 @@ struct is_umbrella_strategy struct cartesian_base : umbrella_strategy { - typedef cartesian_tag cs_tag; + using cs_tag = int; }; template @@ -60,7 +60,7 @@ class spherical_base : umbrella_strategy >::type radius_type; public: - typedef spherical_tag cs_tag; + using cs_tag = int; spherical_base() : m_radius(1.0) @@ -92,10 +92,10 @@ template <> class spherical_base : umbrella_strategy { protected: - typedef double radius_type; + using radius_type = double; public: - typedef spherical_tag cs_tag; + using cs_tag = int; srs::sphere model() const { @@ -113,7 +113,7 @@ template class geographic_base : umbrella_strategy { public: - typedef geographic_tag cs_tag; + using cs_tag = int; geographic_base() : m_spheroid() diff --git a/include/boost/geometry/strategies/distance_result.hpp b/include/boost/geometry/strategies/distance_result.hpp index 0e07b28d7c..a70e2fff32 100644 --- a/include/boost/geometry/strategies/distance_result.hpp +++ b/include/boost/geometry/strategies/distance_result.hpp @@ -60,7 +60,7 @@ struct distance_result_strategy2_type template struct distance_result_strategy2_type { - typedef Strategy type; + using type = Strategy; }; template diff --git a/include/boost/geometry/strategies/geographic/azimuth.hpp b/include/boost/geometry/strategies/geographic/azimuth.hpp index 9e6914d92d..fbb868e7b9 100644 --- a/include/boost/geometry/strategies/geographic/azimuth.hpp +++ b/include/boost/geometry/strategies/geographic/azimuth.hpp @@ -45,7 +45,7 @@ class geographic > {}; - typedef Spheroid model_type; + using model_type = Spheroid; inline geographic() : m_spheroid() @@ -100,18 +100,10 @@ private : T2 const& lon2_rad, T2 const& lat2_rad, Result& a1, Result& a2) const { - typedef typename result_type::type calc_t; - - typedef typename FormulaPolicy::template inverse - < - calc_t, - false, - EnableAzimuth, - EnableReverseAzimuth, - false, - false - > inverse_type; - typedef typename inverse_type::result_type inverse_result; + using calc_t = typename result_type::type; + + using inverse_type = typename FormulaPolicy::template inverse; + using inverse_result = typename inverse_type::result_type; inverse_result i_res = inverse_type::apply(calc_t(lon1_rad), calc_t(lat1_rad), calc_t(lon2_rad), calc_t(lat2_rad), m_spheroid); diff --git a/include/boost/geometry/strategies/geographic/densify.hpp b/include/boost/geometry/strategies/geographic/densify.hpp index 529f90d6bf..0600ecc768 100644 --- a/include/boost/geometry/strategies/geographic/densify.hpp +++ b/include/boost/geometry/strategies/geographic/densify.hpp @@ -63,7 +63,7 @@ class geographic 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; + using out_point_t = typename AssignPolicy::point_type; typedef typename select_most_precise < typename coordinate_type::type, @@ -71,8 +71,8 @@ class geographic CalculationType >::type calc_t; - typedef typename FormulaPolicy::template direct direct_t; - typedef typename FormulaPolicy::template inverse inverse_t; + using direct_t = int; + using inverse_t = int; typename inverse_t::result_type inv_r = inverse_t::apply(get_as_radian<0>(p0), get_as_radian<1>(p0), @@ -125,7 +125,7 @@ namespace services template <> struct default_strategy { - typedef strategy::densify::geographic<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp b/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp index e62e5a3d7e..8b90adcd1c 100644 --- a/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp +++ b/include/boost/geometry/strategies/geographic/disjoint_segment_box.hpp @@ -54,7 +54,7 @@ template struct segment_box_geographic { public: - typedef Spheroid model_type; + using model_type = Spheroid; inline segment_box_geographic() : m_spheroid() @@ -64,7 +64,7 @@ struct segment_box_geographic : m_spheroid(spheroid) {} - typedef covered_by::spherical_point_box disjoint_point_box_strategy_type; + using disjoint_point_box_strategy_type = int; static inline disjoint_point_box_strategy_type get_disjoint_point_box_strategy() { @@ -111,7 +111,7 @@ template struct default_strategy { - typedef segment_box_geographic<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/geographic/distance.hpp b/include/boost/geometry/strategies/geographic/distance.hpp index 3602a631a3..4536788bf1 100644 --- a/include/boost/geometry/strategies/geographic/distance.hpp +++ b/include/boost/geometry/strategies/geographic/distance.hpp @@ -78,7 +78,7 @@ public : > {}; - typedef Spheroid model_type; + using model_type = Spheroid; inline geographic() : m_spheroid() @@ -115,7 +115,7 @@ public : inline typename calculation_type::type apply(Point1 const& point1, Point2 const& point2) const { - typedef typename calculation_type::type CT; + using CT = typename calculation_type::type; CT lon1 = get_as_radian<0>(point1); CT lat1 = get_as_radian<1>(point1); @@ -147,7 +147,7 @@ template > struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -172,7 +172,7 @@ template > struct comparable_type > { - typedef geographic type; + using type = geographic; }; diff --git a/include/boost/geometry/strategies/geographic/distance_andoyer.hpp b/include/boost/geometry/strategies/geographic/distance_andoyer.hpp index d732951642..46845f4d23 100644 --- a/include/boost/geometry/strategies/geographic/distance_andoyer.hpp +++ b/include/boost/geometry/strategies/geographic/distance_andoyer.hpp @@ -54,10 +54,7 @@ class andoyer strategy::andoyer, Spheroid, CalculationType > { - typedef strategy::distance::geographic - < - strategy::andoyer, Spheroid, CalculationType - > base_type; + using base_type = int; public : inline andoyer() @@ -77,7 +74,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -90,7 +87,7 @@ struct return_type, P1, P2> template struct comparable_type > { - typedef andoyer type; + using type = andoyer; }; diff --git a/include/boost/geometry/strategies/geographic/distance_cross_track.hpp b/include/boost/geometry/strategies/geographic/distance_cross_track.hpp index db5e46b9c1..86160123a1 100644 --- a/include/boost/geometry/strategies/geographic/distance_cross_track.hpp +++ b/include/boost/geometry/strategies/geographic/distance_cross_track.hpp @@ -791,7 +791,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_segment type; + using type = int; }; template @@ -812,7 +812,7 @@ template > struct tag > { - typedef strategy_tag_distance_point_segment type; + using type = int; }; template @@ -825,7 +825,7 @@ template > struct tag > { - typedef strategy_tag_distance_point_segment type; + using type = int; }; //return types @@ -880,10 +880,7 @@ template > struct comparable_type > { - typedef geographic_cross_track - < - FormulaPolicy, Spheroid, CalculationType - > type; + using type = geographic_cross_track; }; @@ -949,10 +946,7 @@ template struct result_from_distance, P, PS> { private : - typedef typename geographic_cross_track - < - FormulaPolicy, Spheroid, CalculationType - >::template return_type::type return_type; + using return_type = typename geographic_cross_track::template return_type::type; public : template static inline return_type @@ -996,7 +990,7 @@ struct default_strategy geographic_tag, geographic_tag > { - typedef geographic_cross_track<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/geographic/distance_cross_track_box_box.hpp b/include/boost/geometry/strategies/geographic/distance_cross_track_box_box.hpp index fed9a670a6..fbe7ec0287 100644 --- a/include/boost/geometry/strategies/geographic/distance_cross_track_box_box.hpp +++ b/include/boost/geometry/strategies/geographic/distance_cross_track_box_box.hpp @@ -65,18 +65,13 @@ class geographic_cross_track_box_box // point-point strategy getters struct distance_pp_strategy { - typedef geographic type; + using type = int; }; // point-segment strategy getters struct distance_ps_strategy { - typedef geographic_cross_track - < - FormulaPolicy, - Spheroid, - CalculationType - > type; + using type = int; }; template @@ -111,7 +106,7 @@ class geographic_cross_track_box_box ); #endif */ - typedef typename return_type::type return_type; + using return_type = typename return_type::type; return details::cross_track_box_box_generic ::apply(box1, box2, typename distance_pp_strategy::type(m_spheroid), @@ -136,7 +131,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_box_box type; + using type = int; }; @@ -167,10 +162,7 @@ struct return_type, Box1, Box2> template struct comparable_type > { - typedef geographic_cross_track_box_box - < - typename comparable_type::type, Spheroid, CalculationType - > type; + using type = int; }; @@ -193,12 +185,9 @@ struct result_from_distance > { private: - typedef geographic_cross_track_box_box this_strategy; + using this_strategy = geographic_cross_track_box_box; - typedef typename this_strategy::template return_type - < - Box1, Box2 - >::type return_type; + using return_type = typename this_strategy::template return_type::type; public: template @@ -221,7 +210,7 @@ struct default_strategy geographic_tag, geographic_tag > { - typedef geographic_cross_track_box_box<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp b/include/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp index e4dea34772..a1c8a57951 100644 --- a/include/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp +++ b/include/boost/geometry/strategies/geographic/distance_cross_track_point_box.hpp @@ -63,7 +63,7 @@ class geographic_cross_track_point_box // point-point strategy getters struct distance_ps_strategy { - typedef geographic_cross_track type; + using type = int; }; template @@ -94,7 +94,7 @@ class geographic_cross_track_point_box #endif */ - typedef typename return_type::type return_type; + using return_type = typename return_type::type; return details::cross_track_point_box_generic ::apply(point, box, @@ -119,7 +119,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_box type; + using type = int; }; @@ -150,10 +150,7 @@ struct return_type, P, Box> template struct comparable_type > { - typedef geographic_cross_track_point_box - < - Strategy, Spheroid, CalculationType - > type; + using type = geographic_cross_track_point_box; }; @@ -176,12 +173,9 @@ struct result_from_distance > { private: - typedef geographic_cross_track_point_box this_strategy; + using this_strategy = geographic_cross_track_point_box; - typedef typename this_strategy::template return_type - < - P, Box - >::type return_type; + using return_type = typename this_strategy::template return_type::type; public: template @@ -202,7 +196,7 @@ struct default_strategy geographic_tag, geographic_tag > { - typedef geographic_cross_track_point_box<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/geographic/distance_karney.hpp b/include/boost/geometry/strategies/geographic/distance_karney.hpp index 2391496b30..f90bc30abc 100644 --- a/include/boost/geometry/strategies/geographic/distance_karney.hpp +++ b/include/boost/geometry/strategies/geographic/distance_karney.hpp @@ -43,10 +43,7 @@ class karney strategy::karney, Spheroid, CalculationType > { - typedef strategy::distance::geographic - < - strategy::karney, Spheroid, CalculationType - > base_type; + using base_type = int; public: inline karney() @@ -65,7 +62,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -78,7 +75,7 @@ struct return_type, P1, P2> template struct comparable_type > { - typedef karney type; + using type = karney; }; diff --git a/include/boost/geometry/strategies/geographic/distance_segment_box.hpp b/include/boost/geometry/strategies/geographic/distance_segment_box.hpp index 552bfcdbe3..3dfd7512c2 100644 --- a/include/boost/geometry/strategies/geographic/distance_segment_box.hpp +++ b/include/boost/geometry/strategies/geographic/distance_segment_box.hpp @@ -58,7 +58,7 @@ struct geographic_segment_box > {}; - typedef geographic_tag cs_tag; + using cs_tag = int; //constructor @@ -122,7 +122,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_segment_box type; + using type = int; }; template @@ -143,7 +143,7 @@ template > struct tag > { - typedef strategy_tag_distance_segment_box type; + using type = int; }; // return types @@ -186,10 +186,7 @@ template > struct comparable_type > { - typedef geographic_segment_box - < - FormulaPolicy, Spheroid, CalculationType - > type; + using type = geographic_segment_box; }; template @@ -200,10 +197,7 @@ template > struct get_comparable > { - typedef typename comparable_type - < - geographic_segment_box - >::type comparable_type; + using comparable_type = int; public : static inline comparable_type apply(geographic_segment_box const& ) @@ -223,10 +217,7 @@ template struct result_from_distance, PS, PB> { private : - typedef typename geographic_segment_box - < - FormulaPolicy - >::template return_type::type return_type; + using return_type = int; public : template static inline return_type @@ -247,10 +238,7 @@ template struct result_from_distance, PS, PB> { private : - typedef typename geographic_segment_box - < - FormulaPolicy, Spheroid, CalculationType - >::template return_type::type return_type; + using return_type = typename geographic_segment_box::template return_type::type; public : template static inline return_type @@ -270,7 +258,7 @@ struct default_strategy geographic_tag, geographic_tag > { - typedef geographic_segment_box<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/geographic/distance_thomas.hpp b/include/boost/geometry/strategies/geographic/distance_thomas.hpp index 490920c778..2be5194575 100644 --- a/include/boost/geometry/strategies/geographic/distance_thomas.hpp +++ b/include/boost/geometry/strategies/geographic/distance_thomas.hpp @@ -48,10 +48,7 @@ class thomas strategy::thomas, Spheroid, CalculationType > { - typedef strategy::distance::geographic - < - strategy::thomas, Spheroid, CalculationType - > base_type; + using base_type = int; public : inline thomas() @@ -70,7 +67,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -83,7 +80,7 @@ struct return_type, P1, P2> template struct comparable_type > { - typedef thomas type; + using type = thomas; }; diff --git a/include/boost/geometry/strategies/geographic/distance_vincenty.hpp b/include/boost/geometry/strategies/geographic/distance_vincenty.hpp index 41146db9ff..c688da1973 100644 --- a/include/boost/geometry/strategies/geographic/distance_vincenty.hpp +++ b/include/boost/geometry/strategies/geographic/distance_vincenty.hpp @@ -50,10 +50,7 @@ class vincenty strategy::vincenty, Spheroid, CalculationType > { - typedef strategy::distance::geographic - < - strategy::vincenty, Spheroid, CalculationType - > base_type; + using base_type = int; public: inline vincenty() @@ -72,7 +69,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -85,7 +82,7 @@ struct return_type, P1, P2> template struct comparable_type > { - typedef vincenty type; + using type = vincenty; }; diff --git a/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp b/include/boost/geometry/strategies/geographic/intersection_elliptic.hpp index c7aaf8aa8f..2c5d7b84a9 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 = int; // 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 = int; 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 = int; // not normalized plane(Point3d const& p1, Point3d const& p2, Spheroid const& spheroid) diff --git a/include/boost/geometry/strategies/geographic/line_interpolate.hpp b/include/boost/geometry/strategies/geographic/line_interpolate.hpp index 53ed8e2b59..29520f5daf 100644 --- a/include/boost/geometry/strategies/geographic/line_interpolate.hpp +++ b/include/boost/geometry/strategies/geographic/line_interpolate.hpp @@ -63,21 +63,15 @@ class geographic Point & p, Distance const& distance) const { - typedef typename select_calculation_type_alt - < - CalculationType, - Point - >::type calc_t; + using calc_t = int; - typedef typename FormulaPolicy::template inverse - inverse_t; + using inverse_t = typename FormulaPolicy::template inverse; calc_t azimuth = inverse_t::apply(get_as_radian<0>(p0), get_as_radian<1>(p0), get_as_radian<0>(p1), get_as_radian<1>(p1), m_spheroid).azimuth; - typedef typename FormulaPolicy::template direct - direct_t; + using direct_t = typename FormulaPolicy::template direct; typename direct_t::result_type dir_r = direct_t::apply(get_as_radian<0>(p0), get_as_radian<1>(p0), @@ -105,7 +99,7 @@ namespace services template <> struct default_strategy { - typedef strategy::line_interpolate::geographic<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/geographic/mapping_ssf.hpp b/include/boost/geometry/strategies/geographic/mapping_ssf.hpp index 57fd985a9c..b3a70e9eea 100644 --- a/include/boost/geometry/strategies/geographic/mapping_ssf.hpp +++ b/include/boost/geometry/strategies/geographic/mapping_ssf.hpp @@ -60,10 +60,7 @@ struct mapper template struct mapper { - typedef typename promote_floating_point - < - typename radius_type::type - >::type fraction_type; + using fraction_type = int; explicit inline mapper(Spheroid const& spheroid) { @@ -84,10 +81,7 @@ struct mapper template struct mapper { - typedef typename promote_floating_point - < - typename radius_type::type - >::type fraction_type; + using fraction_type = int; explicit inline mapper(Spheroid const& spheroid) { @@ -138,14 +132,7 @@ public : template inline int apply(P1 const& p1, P2 const& p2, P const& p) const { - typedef typename promote_floating_point - < - typename select_calculation_type_alt - < - CalculationType, - P1, P2, P - >::type - >::type calculation_type; + using calculation_type = int; calculation_type lon1 = get_as_radian<0>(p1); calculation_type lat1 = m_mapper.template apply(get_as_radian<1>(p1)); diff --git a/include/boost/geometry/strategies/geographic/point_order.hpp b/include/boost/geometry/strategies/geographic/point_order.hpp index c066761725..4ac05dd24d 100644 --- a/include/boost/geometry/strategies/geographic/point_order.hpp +++ b/include/boost/geometry/strategies/geographic/point_order.hpp @@ -37,7 +37,7 @@ template > struct geographic { - typedef azimuth_tag version_tag; + using version_tag = int; template struct result_type @@ -60,7 +60,7 @@ struct geographic typename result_type::type & azi, typename result_type::type & razi) const { - typedef typename result_type::type calc_t; + using calc_t = typename result_type::type; if (equals_point_point(p1, p2)) { @@ -108,7 +108,7 @@ namespace services template <> struct default_strategy { - typedef geographic<> type; + using type = int; }; } // namespace services diff --git a/include/boost/geometry/strategies/geographic/side.hpp b/include/boost/geometry/strategies/geographic/side.hpp index a0b4abc815..4f5745b8a4 100644 --- a/include/boost/geometry/strategies/geographic/side.hpp +++ b/include/boost/geometry/strategies/geographic/side.hpp @@ -65,7 +65,7 @@ template class geographic { public: - typedef geographic_tag cs_tag; + using cs_tag = int; geographic() = default; @@ -76,7 +76,7 @@ class geographic template inline int apply(P1 const& p1, P2 const& p2, P const& p) const { - typedef strategy::within::spherical_point_point equals_point_point_strategy_type; + using equals_point_point_strategy_type = int; if (equals_point_point_strategy_type::apply(p, p1) || equals_point_point_strategy_type::apply(p, p2) || equals_point_point_strategy_type::apply(p1, p2)) @@ -84,17 +84,9 @@ class geographic return 0; } - typedef typename promote_floating_point - < - typename select_calculation_type_alt - < - CalculationType, - P1, P2, P - >::type - >::type calc_t; - - typedef typename FormulaPolicy::template inverse - inverse_formula; + using calc_t = int; + + using inverse_formula = typename FormulaPolicy::template inverse; calc_t a1p = azimuth(p1, p, m_model); calc_t a12 = azimuth(p1, p2, m_model); diff --git a/include/boost/geometry/strategies/geographic/side_andoyer.hpp b/include/boost/geometry/strategies/geographic/side_andoyer.hpp index 204e45f6e2..9cd66cf5a5 100644 --- a/include/boost/geometry/strategies/geographic/side_andoyer.hpp +++ b/include/boost/geometry/strategies/geographic/side_andoyer.hpp @@ -40,7 +40,7 @@ template class andoyer : public side::geographic { - typedef side::geographic base_t; + using base_t = int; public: andoyer() diff --git a/include/boost/geometry/strategies/geographic/side_thomas.hpp b/include/boost/geometry/strategies/geographic/side_thomas.hpp index e6f8d77b58..a76f781094 100644 --- a/include/boost/geometry/strategies/geographic/side_thomas.hpp +++ b/include/boost/geometry/strategies/geographic/side_thomas.hpp @@ -40,7 +40,7 @@ template class thomas : public side::geographic { - typedef side::geographic base_t; + using base_t = int; public: thomas() diff --git a/include/boost/geometry/strategies/geographic/side_vincenty.hpp b/include/boost/geometry/strategies/geographic/side_vincenty.hpp index b2f51b0901..5da73833f5 100644 --- a/include/boost/geometry/strategies/geographic/side_vincenty.hpp +++ b/include/boost/geometry/strategies/geographic/side_vincenty.hpp @@ -40,7 +40,7 @@ template class vincenty : public side::geographic { - typedef side::geographic base_t; + using base_t = int; public: vincenty() diff --git a/include/boost/geometry/strategies/index/geographic.hpp b/include/boost/geometry/strategies/index/geographic.hpp index 609d2c82f3..b5864b677d 100644 --- a/include/boost/geometry/strategies/index/geographic.hpp +++ b/include/boost/geometry/strategies/index/geographic.hpp @@ -27,7 +27,7 @@ template class geographic : public distance::geographic { - typedef distance::geographic base_t; + using base_t = int; public: geographic() = default; diff --git a/include/boost/geometry/strategies/intersection_result.hpp b/include/boost/geometry/strategies/intersection_result.hpp index 971dc9f2ba..f99fc30619 100644 --- a/include/boost/geometry/strategies/intersection_result.hpp +++ b/include/boost/geometry/strategies/intersection_result.hpp @@ -67,7 +67,7 @@ struct segment_intersection_points // TODO: combine intersections and fractions in one struct Point intersections[2]; fraction_type fractions[2]; - typedef Point point_type; + using point_type = Point; segment_intersection_points() : count(0) diff --git a/include/boost/geometry/strategies/intersection_strategies.hpp b/include/boost/geometry/strategies/intersection_strategies.hpp index 781b3984da..b80201361c 100644 --- a/include/boost/geometry/strategies/intersection_strategies.hpp +++ b/include/boost/geometry/strategies/intersection_strategies.hpp @@ -46,17 +46,10 @@ template struct intersection_strategies { private : - typedef segment_intersection_points - < - IntersectionPoint, - typename segment_ratio_type::type - > ip_type; + using ip_type = int; public: - typedef policies::relate::segments_intersection_policy - < - ip_type - > intersection_policy_type; + using intersection_policy_type = int; typedef typename strategy::intersection::services::default_strategy < diff --git a/include/boost/geometry/strategies/io/cartesian.hpp b/include/boost/geometry/strategies/io/cartesian.hpp index cd726a425b..0a1e90c5b5 100644 --- a/include/boost/geometry/strategies/io/cartesian.hpp +++ b/include/boost/geometry/strategies/io/cartesian.hpp @@ -65,7 +65,7 @@ namespace services template struct default_strategy { - typedef cartesian<> type; + using type = int; }; } // namespace services diff --git a/include/boost/geometry/strategies/io/geographic.hpp b/include/boost/geometry/strategies/io/geographic.hpp index a61ba15a74..0b436a5e77 100644 --- a/include/boost/geometry/strategies/io/geographic.hpp +++ b/include/boost/geometry/strategies/io/geographic.hpp @@ -85,7 +85,7 @@ namespace services template struct default_strategy { - typedef geographic<> type; + using type = int; }; } // namespace services diff --git a/include/boost/geometry/strategies/io/spherical.hpp b/include/boost/geometry/strategies/io/spherical.hpp index c74515a990..61e49636f5 100644 --- a/include/boost/geometry/strategies/io/spherical.hpp +++ b/include/boost/geometry/strategies/io/spherical.hpp @@ -65,7 +65,7 @@ namespace services template struct default_strategy { - typedef spherical<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/normalize.hpp b/include/boost/geometry/strategies/normalize.hpp index 8cfaf95227..ce8a1a7aa2 100644 --- a/include/boost/geometry/strategies/normalize.hpp +++ b/include/boost/geometry/strategies/normalize.hpp @@ -128,7 +128,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 = int; in_coordinate_type longitude = geometry::get<0>(point_in); in_coordinate_type latitude = geometry::get<1>(point_in); @@ -187,7 +187,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 = int; 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/azimuth.hpp b/include/boost/geometry/strategies/spherical/azimuth.hpp index 6fcb15ac96..29e57a0e29 100644 --- a/include/boost/geometry/strategies/spherical/azimuth.hpp +++ b/include/boost/geometry/strategies/spherical/azimuth.hpp @@ -78,7 +78,7 @@ class spherical T2 const& lon2_rad, T2 const& lat2_rad, Result& a1, Result& a2) { - typedef typename result_type::type calc_t; + using calc_t = typename result_type::type; geometry::formula::result_spherical result = geometry::formula::spherical_azimuth @@ -107,7 +107,7 @@ namespace services template <> struct default_strategy { - typedef strategy::azimuth::spherical<> type; + using type = int; }; } diff --git a/include/boost/geometry/strategies/spherical/compare.hpp b/include/boost/geometry/strategies/spherical/compare.hpp index dc3d14bef8..60dc9add74 100644 --- a/include/boost/geometry/strategies/spherical/compare.hpp +++ b/include/boost/geometry/strategies/spherical/compare.hpp @@ -72,7 +72,7 @@ struct spherical_latitude 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 same_units_type = int; template static inline bool apply(Point1 const& left, Point2 const& right, @@ -140,8 +140,8 @@ struct spherical_longitude 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 same_units_type = int; + using units_type = int; static const bool is_equatorial = ! std::is_same < @@ -292,7 +292,7 @@ struct default_strategy spherical_tag, spherical_tag > { - typedef compare::spherical type; + using type = compare::spherical; }; template diff --git a/include/boost/geometry/strategies/spherical/densify.hpp b/include/boost/geometry/strategies/spherical/densify.hpp index 8b14f7ae64..cf8d1f3c76 100644 --- a/include/boost/geometry/strategies/spherical/densify.hpp +++ b/include/boost/geometry/strategies/spherical/densify.hpp @@ -79,7 +79,7 @@ class spherical 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; + using out_point_t = typename AssignPolicy::point_type; typedef typename select_most_precise < typename coordinate_type::type, @@ -135,7 +135,7 @@ namespace services template <> struct default_strategy { - typedef strategy::densify::spherical<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp b/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp index f0504a8b17..99e9ccf583 100644 --- a/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp +++ b/include/boost/geometry/strategies/spherical/disjoint_box_box.hpp @@ -50,7 +50,7 @@ struct box_box_on_spheroid typename coordinate_type::type >::type calc_t; typedef typename geometry::detail::cs_angular_units::type units_t; - typedef math::detail::constants_on_spheroid constants; + using constants = int; calc_t const b1_min = get(box1); calc_t const b1_max = get(box1); @@ -111,7 +111,7 @@ namespace services template struct default_strategy { - typedef disjoint::spherical_box_box type; + using type = disjoint::spherical_box_box; }; template diff --git a/include/boost/geometry/strategies/spherical/disjoint_segment_box.hpp b/include/boost/geometry/strategies/spherical/disjoint_segment_box.hpp index ac4235f146..ffd1e5f95b 100644 --- a/include/boost/geometry/strategies/spherical/disjoint_segment_box.hpp +++ b/include/boost/geometry/strategies/spherical/disjoint_segment_box.hpp @@ -44,7 +44,7 @@ namespace boost { namespace geometry { namespace strategy { namespace disjoint // other strategies that are used are intersection and covered_by strategies. struct segment_box_spherical { - typedef covered_by::spherical_point_box disjoint_point_box_strategy_type; + using disjoint_point_box_strategy_type = int; static inline disjoint_point_box_strategy_type get_disjoint_point_box_strategy() { @@ -78,7 +78,7 @@ template struct default_strategy { - typedef segment_box_spherical type; + using type = segment_box_spherical; }; template diff --git a/include/boost/geometry/strategies/spherical/distance_cross_track_box_box.hpp b/include/boost/geometry/strategies/spherical/distance_cross_track_box_box.hpp index f021cf99ef..d1702562fd 100644 --- a/include/boost/geometry/strategies/spherical/distance_cross_track_box_box.hpp +++ b/include/boost/geometry/strategies/spherical/distance_cross_track_box_box.hpp @@ -281,14 +281,14 @@ class cross_track_box_box point_type_t> {}; - typedef typename Strategy::radius_type radius_type; + using radius_type = typename Strategy::radius_type; // strategy getters // point-segment strategy getters struct distance_ps_strategy { - typedef cross_track type; + using type = int; }; typedef typename strategy::distance::services::comparable_type @@ -296,13 +296,7 @@ class cross_track_box_box Strategy >::type pp_comparable_strategy; - typedef std::conditional_t - < - std::is_same - < - pp_comparable_strategy, - Strategy - >::value, + using value = int, typename strategy::distance::services::comparable_type < typename distance_ps_strategy::type @@ -343,7 +337,7 @@ class cross_track_box_box >) ); #endif - typedef typename return_type::type return_type; + using return_type = typename return_type::type; return details::cross_track_box_box_generic ::apply(box1, box2, m_strategy, @@ -368,7 +362,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_box_box type; + using type = int; }; @@ -384,18 +378,15 @@ struct return_type, Box1, Box2> template struct comparable_type > { - typedef cross_track_box_box - < - CalculationType, typename comparable_type::type - > type; + using type = int; }; template struct get_comparable > { - typedef cross_track_box_box this_strategy; - typedef typename comparable_type::type comparable_type; + using this_strategy = cross_track_box_box; + using comparable_type = int; public: static inline comparable_type apply(this_strategy const& strategy) @@ -412,12 +403,9 @@ struct result_from_distance > { private: - typedef cross_track_box_box this_strategy; + using this_strategy = cross_track_box_box; - typedef typename this_strategy::template return_type - < - Box1, Box2 - >::type return_type; + using return_type = typename this_strategy::template return_type::type; public: template diff --git a/include/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp b/include/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp index c4c7fa79e8..2394621abf 100644 --- a/include/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp +++ b/include/boost/geometry/strategies/spherical/distance_cross_track_point_box.hpp @@ -208,14 +208,14 @@ class cross_track_point_box : services::return_type> {}; - typedef typename Strategy::radius_type radius_type; + using radius_type = typename Strategy::radius_type; // strategy getters // point-segment strategy getters struct distance_ps_strategy { - typedef cross_track type; + using type = int; }; typedef typename strategy::distance::services::comparable_type @@ -223,13 +223,7 @@ class cross_track_point_box Strategy >::type pp_comparable_strategy; - typedef std::conditional_t - < - std::is_same - < - pp_comparable_strategy, - Strategy - >::value, + using value = int, typename strategy::distance::services::comparable_type < typename distance_ps_strategy::type @@ -270,7 +264,7 @@ class cross_track_point_box >) ); #endif - typedef typename return_type::type return_type; + using return_type = typename return_type::type; return details::cross_track_point_box_generic ::apply(point, box, ps_strategy_type(m_strategy)); @@ -294,7 +288,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_box type; + using type = int; }; @@ -310,18 +304,15 @@ struct return_type, P, Box> template struct comparable_type > { - typedef cross_track_point_box - < - CalculationType, typename comparable_type::type - > type; + using type = int; }; template struct get_comparable > { - typedef cross_track_point_box this_strategy; - typedef typename comparable_type::type comparable_type; + using this_strategy = cross_track_point_box; + using comparable_type = int; public: static inline comparable_type apply(this_strategy const& strategy) @@ -338,12 +329,9 @@ struct result_from_distance > { private: - typedef cross_track_point_box this_strategy; + using this_strategy = cross_track_point_box; - typedef typename this_strategy::template return_type - < - P, Box - >::type return_type; + using return_type = typename this_strategy::template return_type::type; public: template diff --git a/include/boost/geometry/strategies/spherical/distance_haversine.hpp b/include/boost/geometry/strategies/spherical/distance_haversine.hpp index dc62c60edd..427cdf65ad 100644 --- a/include/boost/geometry/strategies/spherical/distance_haversine.hpp +++ b/include/boost/geometry/strategies/spherical/distance_haversine.hpp @@ -145,7 +145,7 @@ template > class haversine { - typedef comparable::haversine comparable_type; + using comparable_type = comparable::haversine; public : template @@ -187,7 +187,7 @@ public : inline typename calculation_type::type apply(Point1 const& p1, Point2 const& p2) const { - typedef typename calculation_type::type calculation_type; + using calculation_type = typename calculation_type::type; calculation_type const a = comparable_type::apply(p1, p2); calculation_type const c = calculation_type(2.0) * asin(math::sqrt(a)); return calculation_type(m_radius) * c; @@ -214,7 +214,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_point_point type; + using type = int; }; @@ -227,7 +227,7 @@ struct return_type, P1, P2> template struct comparable_type > { - typedef comparable::haversine type; + using type = comparable::haversine; }; @@ -235,8 +235,8 @@ template struct get_comparable > { private : - typedef haversine this_type; - typedef comparable::haversine comparable_type; + using this_type = haversine; + using comparable_type = comparable::haversine; public : static inline comparable_type apply(this_type const& input) { @@ -248,8 +248,8 @@ template , P1, P2> { private : - typedef haversine this_type; - typedef typename return_type::type return_type; + using this_type = haversine; + using return_type = int; public : template static inline return_type apply(this_type const& , T const& value) @@ -318,7 +318,7 @@ struct default_strategy spherical_equatorial_tag, spherical_equatorial_tag > { - typedef strategy::distance::haversine::type> type; + using type = int; }; // Note: spherical polar coordinate system requires "get_as_radian_equatorial" diff --git a/include/boost/geometry/strategies/spherical/distance_segment_box.hpp b/include/boost/geometry/strategies/spherical/distance_segment_box.hpp index 32ce3bcaaa..1a89d146cf 100644 --- a/include/boost/geometry/strategies/spherical/distance_segment_box.hpp +++ b/include/boost/geometry/strategies/spherical/distance_segment_box.hpp @@ -56,11 +56,9 @@ struct generic_segment_box { ReturnType result; typename LessEqual::other less_equal; - typedef geometry::model::segment segment_type; + using segment_type = int; // if cs_tag is spherical_tag check segment's cs_tag with spherical_equatorial_tag as default - typedef std::conditional_t - < - std::is_same::value, + using value = int, std::conditional_t < std::is_same @@ -72,10 +70,8 @@ struct generic_segment_box >, typename Strategies::cs_tag > cs_tag; - typedef geometry::detail::disjoint:: - disjoint_segment_box_sphere_or_spheroid - disjoint_sb; - typedef typename disjoint_sb::disjoint_info disjoint_info_type; + using disjoint_sb = int; + using disjoint_info_type = int; segment_type seg(p0, p1); @@ -107,7 +103,7 @@ 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 CT = int; geometry::model::box mbr; geometry::envelope(seg, mbr, strategies); @@ -216,7 +212,7 @@ struct spherical_segment_box > {}; - typedef spherical_tag cs_tag; + using cs_tag = int; // constructors @@ -285,7 +281,7 @@ namespace services template struct tag > { - typedef strategy_tag_distance_segment_box type; + using type = int; }; template @@ -298,21 +294,14 @@ struct comparable_type > { // Define a cartesian_segment_box strategy with its underlying point-segment // strategy being comparable - typedef spherical_segment_box - < - CalculationType, - typename comparable_type::type - > type; + using type = int; }; template struct get_comparable > { - typedef typename comparable_type - < - spherical_segment_box - >::type comparable_type; + using comparable_type = int; public : static inline comparable_type apply(spherical_segment_box const& ) { @@ -324,15 +313,7 @@ template struct result_from_distance, PS, PB> { private : - typedef typename return_type< - spherical_segment_box - < - CalculationType, - Strategy - >, - PS, - PB - >::type return_type; + using return_type = int; public : template static inline return_type apply(spherical_segment_box { - typedef spherical_segment_box<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/spherical/get_radius.hpp b/include/boost/geometry/strategies/spherical/get_radius.hpp index 411642b13a..5f0b7f0f9e 100644 --- a/include/boost/geometry/strategies/spherical/get_radius.hpp +++ b/include/boost/geometry/strategies/spherical/get_radius.hpp @@ -46,7 +46,7 @@ struct get_radius template struct get_radius { - typedef RadiusTypeOrSphere type; + using type = RadiusTypeOrSphere; static type apply(RadiusTypeOrSphere const& radius) { return radius; diff --git a/include/boost/geometry/strategies/spherical/intersection.hpp b/include/boost/geometry/strategies/spherical/intersection.hpp index 804efd766a..ca58a19ce1 100644 --- a/include/boost/geometry/strategies/spherical/intersection.hpp +++ b/include/boost/geometry/strategies/spherical/intersection.hpp @@ -94,7 +94,7 @@ template > struct ecef_segments { - typedef spherical_tag cs_tag; + using cs_tag = int; enum intersection_point_flag { ipi_inters = 0, ipi_at_a1, ipi_at_a2, ipi_at_b1, ipi_at_b2 }; @@ -157,8 +157,8 @@ struct ecef_segments // Initialize explicitly to prevent compiler errors in case of PoD type CalcPolicy const calc_policy = CalcPolicy(); - 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; BOOST_CONCEPT_ASSERT( (concepts::ConstPoint) ); BOOST_CONCEPT_ASSERT( (concepts::ConstPoint) ); @@ -168,8 +168,8 @@ struct ecef_segments point2_type const& b1 = range_q.at(0); point2_type const& b2 = range_q.at(1); - typedef model::referring_segment segment1_type; - typedef model::referring_segment segment2_type; + using segment1_type = int; + using segment2_type = int; segment1_type const a(a1, a2); segment2_type const b(b1, b2); @@ -185,13 +185,12 @@ struct ecef_segments ; } - typedef typename select_calculation_type - ::type calc_t; + using calc_t = int; calc_t const c0 = 0; calc_t const c1 = 1; - typedef model::point vec3d_t; + using vec3d_t = int; vec3d_t const a1v = calc_policy.template to_cart3d(a1); vec3d_t const a2v = calc_policy.template to_cart3d(a2); @@ -794,7 +793,7 @@ struct spherical_segments_calc_policy template struct plane { - typedef typename coordinate_type::type coord_t; + using coord_t = int; // not normalized plane(Point3d const& p1, Point3d const& p2) @@ -832,7 +831,7 @@ struct spherical_segments_calc_policy plane const& plane2, Point3d & ip1, Point3d & ip2) { - typedef typename coordinate_type::type coord_t; + using coord_t = int; ip1 = cross_product(plane1.normal, plane2.normal); // NOTE: the length should be greater than 0 at this point @@ -878,7 +877,7 @@ struct default_strategy template struct default_strategy { - typedef spherical_segments type; + using type = spherical_segments; }; template @@ -908,7 +907,7 @@ namespace within { namespace services template struct default_strategy { - typedef strategy::intersection::spherical_segments<> type; + using type = int; }; template @@ -937,7 +936,7 @@ namespace covered_by { namespace services template struct default_strategy { - typedef strategy::intersection::spherical_segments<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/spherical/line_interpolate.hpp b/include/boost/geometry/strategies/spherical/line_interpolate.hpp index 0d2fcd486c..7de204ae64 100644 --- a/include/boost/geometry/strategies/spherical/line_interpolate.hpp +++ b/include/boost/geometry/strategies/spherical/line_interpolate.hpp @@ -50,7 +50,7 @@ class spherical { public: - typedef typename DistanceStrategy::radius_type radius_type; + using radius_type = typename DistanceStrategy::radius_type; spherical() = default; @@ -69,11 +69,7 @@ class spherical Point & p, Distance const&) const { - typedef typename select_calculation_type_alt - < - CalculationType, - Point - >::type calc_t; + using calc_t = int; formula::interpolate_point_spherical formula; @@ -102,7 +98,7 @@ namespace services template <> struct default_strategy { - typedef strategy::line_interpolate::spherical<> type; + using type = int; }; diff --git a/include/boost/geometry/strategies/spherical/point_in_point.hpp b/include/boost/geometry/strategies/spherical/point_in_point.hpp index 242c22010b..77671ad225 100644 --- a/include/boost/geometry/strategies/spherical/point_in_point.hpp +++ b/include/boost/geometry/strategies/spherical/point_in_point.hpp @@ -59,7 +59,7 @@ namespace detail { namespace within class point_point_on_spheroid { public: - typedef spherical_tag cs_tag; + using cs_tag = int; private: template @@ -67,8 +67,8 @@ class point_point_on_spheroid { static inline bool apply(Point1 const& point1, Point2 const& point2) { - typedef typename helper_geometry::type helper_point_type1; - typedef typename helper_geometry::type helper_point_type2; + using helper_point_type1 = int; + using helper_point_type2 = int; helper_point_type1 point1_normalized; strategy::normalize::spherical_point::apply(point1, point1_normalized); @@ -149,7 +149,7 @@ namespace services template struct default_strategy { - typedef strategy::within::spherical_point_point type; + using type = strategy::within::spherical_point_point; }; } // namespace services @@ -166,7 +166,7 @@ namespace strategy { namespace covered_by { namespace services template struct default_strategy { - typedef strategy::within::spherical_point_point type; + using type = strategy::within::spherical_point_point; }; }}} // namespace strategy::covered_by::services 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 a11c3c7056..73b2e5c78f 100644 --- a/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp +++ b/include/boost/geometry/strategies/spherical/point_in_poly_winding.hpp @@ -122,7 +122,7 @@ class spherical_winding_base }; public: - typedef typename SideStrategy::cs_tag cs_tag; + using cs_tag = typename SideStrategy::cs_tag; spherical_winding_base() = default; @@ -132,16 +132,16 @@ class spherical_winding_base {} // Typedefs and static methods to fulfill the concept - typedef counter state_type; + using state_type = counter; template inline bool apply(Point const& point, PointOfSegment const& s1, PointOfSegment const& s2, counter& state) const { - typedef typename calculation_type::type calc_t; + using calc_t = typename calculation_type::type; typedef typename geometry::detail::cs_angular_units::type units_t; - typedef math::detail::constants_on_spheroid constants; + using constants = int; bool eq1 = false; bool eq2 = false; @@ -245,9 +245,9 @@ class spherical_winding_base bool& eq2, bool& s_antipodal) { - typedef typename calculation_type::type calc_t; + using calc_t = typename calculation_type::type; typedef typename geometry::detail::cs_angular_units::type units_t; - typedef math::detail::constants_on_spheroid constants; + using constants = int; calc_t const c0 = 0; calc_t const c2 = 2; @@ -372,9 +372,9 @@ class spherical_winding_base PointOfSegment const& seg2, bool eq1, bool eq2, bool s_antipodal) { - typedef typename calculation_type::type calc_t; + using calc_t = typename calculation_type::type; typedef typename geometry::detail::cs_angular_units::type units_t; - typedef math::detail::constants_on_spheroid constants; + using constants = int; // If both segment endpoints were poles below checks wouldn't be enough // but this means that either both are the same or that they are N/S poles @@ -465,7 +465,7 @@ class spherical_winding_base PointOfSegment const& se, count_info const& ci) const { - typedef typename coordinate_type::type scoord_t; + using scoord_t = int; typedef typename geometry::detail::cs_angular_units::type units_t; if (math::equals(get<1>(point), get<1>(se))) @@ -499,7 +499,7 @@ class spherical_winding_base template static inline CalcT small_angle() { - typedef math::detail::constants_on_spheroid constants; + using constants = int; return constants::half_period() / CalcT(180); } @@ -555,7 +555,7 @@ namespace services template struct default_strategy { - typedef within::spherical_winding<> type; + using type = int; }; template @@ -579,7 +579,7 @@ namespace strategy { namespace covered_by { namespace services template struct default_strategy { - typedef within::spherical_winding<> type; + using type = int; }; template diff --git a/include/boost/geometry/strategies/spherical/point_order.hpp b/include/boost/geometry/strategies/spherical/point_order.hpp index 3f9eb8ce47..2407dca065 100644 --- a/include/boost/geometry/strategies/spherical/point_order.hpp +++ b/include/boost/geometry/strategies/spherical/point_order.hpp @@ -114,7 +114,7 @@ template struct spherical : strategy::area::spherical { - typedef area_tag version_tag; + using version_tag = int; // TEMP static strategy::area::spherical get_area_strategy() @@ -129,7 +129,7 @@ namespace services template <> struct default_strategy { - typedef spherical<> type; + using type = int; }; /*template <> diff --git a/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp b/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp index d17de30773..87bad1714d 100644 --- a/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp +++ b/include/boost/geometry/strategies/spherical/side_by_cross_track.hpp @@ -50,8 +50,7 @@ public : template static inline int apply(P1 const& p1, P2 const& p2, P const& p) { - typedef strategy::within::spherical_point_point - equals_point_point_strategy_type; + using equals_point_point_strategy_type = int; if (equals_point_point_strategy_type::apply(p, p1) || equals_point_point_strategy_type::apply(p, p2) || equals_point_point_strategy_type::apply(p1, p2)) @@ -59,14 +58,7 @@ public : return 0; } - typedef typename promote_floating_point - < - typename select_calculation_type_alt - < - CalculationType, - P1, P2, P - >::type - >::type calc_t; + using calc_t = int; calc_t d1 = 0.001; // m_strategy.apply(sp1, p); diff --git a/include/boost/geometry/strategies/spherical/ssf.hpp b/include/boost/geometry/strategies/spherical/ssf.hpp index 2d29c400cc..ad033f0bdd 100644 --- a/include/boost/geometry/strategies/spherical/ssf.hpp +++ b/include/boost/geometry/strategies/spherical/ssf.hpp @@ -86,19 +86,12 @@ class spherical_side_formula { public : - typedef spherical_tag cs_tag; + using cs_tag = int; template static inline int apply(P1 const& p1, P2 const& p2, P const& p) { - typedef typename promote_floating_point - < - typename select_calculation_type_alt - < - CalculationType, - P1, P2, P - >::type - >::type calculation_type; + using calculation_type = int; calculation_type const lambda1 = get_as_radian<0>(p1); calculation_type const delta1 = get_as_radian<1>(p1); @@ -127,7 +120,7 @@ struct default_strategy template struct default_strategy { - typedef spherical_side_formula type; + using type = spherical_side_formula; }; template diff --git a/include/boost/geometry/strategies/strategy_transform.hpp b/include/boost/geometry/strategies/strategy_transform.hpp index d095a374de..665efaf608 100644 --- a/include/boost/geometry/strategies/strategy_transform.hpp +++ b/include/boost/geometry/strategies/strategy_transform.hpp @@ -56,7 +56,7 @@ struct transform_coordinates template static inline void transform(Src const& source, Dst& dest, T value) { - typedef typename select_coordinate_type::type coordinate_type; + using coordinate_type = int; F function; set(dest, util::numeric_cast(function(get(source), value))); @@ -135,10 +135,7 @@ struct degree_radian_vv assert_dimension(); assert_dimension(); - typedef typename promote_floating_point - < - typename select_coordinate_type::type - >::type calculation_type; + using calculation_type = int; detail::transform_coordinates < @@ -156,10 +153,7 @@ struct degree_radian_vv_3 assert_dimension(); assert_dimension(); - typedef typename promote_floating_point - < - typename select_coordinate_type::type - >::type calculation_type; + using calculation_type = int; detail::transform_coordinates < @@ -421,7 +415,7 @@ namespace services template struct default_strategy { - typedef copy_direct

type; + using type = copy_direct

; }; /// Specialization for same coordinate system family and system, same dimension, different point type, copy per coordinate diff --git a/include/boost/geometry/strategies/transform/map_transformer.hpp b/include/boost/geometry/strategies/transform/map_transformer.hpp index 101be83f28..267913710b 100644 --- a/include/boost/geometry/strategies/transform/map_transformer.hpp +++ b/include/boost/geometry/strategies/transform/map_transformer.hpp @@ -50,8 +50,8 @@ template class map_transformer : public matrix_transformer { - typedef boost::qvm::mat M; - typedef boost::qvm::mat matrix33; + using M = int; + using matrix33 = int; public : template @@ -112,7 +112,7 @@ private : D py2 = height; // Get the same type, but at least a double - typedef typename select_most_precise::type type; + using type = int; // Calculate appropriate scale, take min because whole box must fit diff --git a/include/boost/geometry/strategies/transform/matrix_transformers.hpp b/include/boost/geometry/strategies/transform/matrix_transformers.hpp index 937cc14899..05811e1e08 100644 --- a/include/boost/geometry/strategies/transform/matrix_transformers.hpp +++ b/include/boost/geometry/strategies/transform/matrix_transformers.hpp @@ -114,8 +114,8 @@ template class matrix_transformer { protected : - typedef CalculationType ct; - typedef boost::qvm::mat matrix_type; + using ct = CalculationType; + using matrix_type = int; matrix_type m_matrix; public : matrix_type const& matrix() const { return m_matrix; } @@ -168,7 +168,7 @@ class matrix_transformer : public detail::matrix_transformer::matrix_transformer template class matrix_transformer : public detail::matrix_transformer::matrix_transformer { - typedef CalculationType ct; + using ct = CalculationType; public : template inline matrix_transformer(Matrix const& matrix) @@ -210,7 +210,7 @@ public : template class matrix_transformer : public detail::matrix_transformer::matrix_transformer { - typedef CalculationType ct; + using ct = CalculationType; public : template inline matrix_transformer(Matrix const& matrix) @@ -256,7 +256,7 @@ public : template class matrix_transformer : public detail::matrix_transformer::matrix_transformer { - typedef CalculationType ct; + using ct = CalculationType; public : template inline matrix_transformer(Matrix const& matrix) diff --git a/include/boost/geometry/strategy/area.hpp b/include/boost/geometry/strategy/area.hpp index 24c7fbc582..616a9f86be 100644 --- a/include/boost/geometry/strategy/area.hpp +++ b/include/boost/geometry/strategy/area.hpp @@ -48,7 +48,7 @@ template > struct result_type { - typedef CalculationType type; + using type = CalculationType; }; template diff --git a/include/boost/geometry/strategy/cartesian/area.hpp b/include/boost/geometry/strategy/cartesian/area.hpp index a18a4f85ea..11d54d5753 100644 --- a/include/boost/geometry/strategy/cartesian/area.hpp +++ b/include/boost/geometry/strategy/cartesian/area.hpp @@ -68,7 +68,7 @@ public : { friend class cartesian; - typedef typename result_type::type return_type; + using return_type = typename result_type::type; public: inline state() @@ -93,7 +93,7 @@ public : PointOfSegment const& p2, state& st) { - typedef typename state::return_type return_type; + using return_type = typename state::return_type; // Below formulas are equivalent, however the two lower ones // suffer less from accuracy loss for great values of coordinates. @@ -126,7 +126,7 @@ namespace services template <> struct default_strategy { - typedef strategy::area::cartesian<> type; + using type = int; }; } // namespace services diff --git a/include/boost/geometry/strategy/cartesian/area_box.hpp b/include/boost/geometry/strategy/cartesian/area_box.hpp index 1263b564df..d1eff6bb8a 100644 --- a/include/boost/geometry/strategy/cartesian/area_box.hpp +++ b/include/boost/geometry/strategy/cartesian/area_box.hpp @@ -40,7 +40,7 @@ class cartesian_box template static inline auto apply(Box const& box) { - typedef typename result_type::type return_type; + using return_type = typename result_type::type; return return_type(get(box) - get(box)) * return_type(get(box) - get(box)); diff --git a/include/boost/geometry/strategy/cartesian/envelope.hpp b/include/boost/geometry/strategy/cartesian/envelope.hpp index f779073425..c6a6dbd2c6 100644 --- a/include/boost/geometry/strategy/cartesian/envelope.hpp +++ b/include/boost/geometry/strategy/cartesian/envelope.hpp @@ -41,7 +41,7 @@ template class cartesian { public: - typedef cartesian_tag cs_tag; + using cs_tag = int; // Linestring, Ring, Polygon @@ -105,7 +105,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::cartesian type; + using type = strategy::envelope::cartesian; }; } // namespace services diff --git a/include/boost/geometry/strategy/cartesian/envelope_box.hpp b/include/boost/geometry/strategy/cartesian/envelope_box.hpp index c4e808dd30..70819ab8c8 100644 --- a/include/boost/geometry/strategy/cartesian/envelope_box.hpp +++ b/include/boost/geometry/strategy/cartesian/envelope_box.hpp @@ -80,7 +80,7 @@ namespace strategy { namespace envelope struct cartesian_box { - typedef cartesian_tag cs_tag; + using cs_tag = int; template static inline void apply(BoxIn const& box_in, BoxOut& mbr) @@ -106,7 +106,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::cartesian_box type; + using type = strategy::envelope::cartesian_box; }; } diff --git a/include/boost/geometry/strategy/cartesian/envelope_multipoint.hpp b/include/boost/geometry/strategy/cartesian/envelope_multipoint.hpp index aaf914943c..a3d682e214 100644 --- a/include/boost/geometry/strategy/cartesian/envelope_multipoint.hpp +++ b/include/boost/geometry/strategy/cartesian/envelope_multipoint.hpp @@ -67,7 +67,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::cartesian_multipoint type; + using type = strategy::envelope::cartesian_multipoint; }; diff --git a/include/boost/geometry/strategy/cartesian/envelope_point.hpp b/include/boost/geometry/strategy/cartesian/envelope_point.hpp index 144dc9a185..0a2412b85e 100644 --- a/include/boost/geometry/strategy/cartesian/envelope_point.hpp +++ b/include/boost/geometry/strategy/cartesian/envelope_point.hpp @@ -93,7 +93,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::cartesian_point type; + using type = strategy::envelope::cartesian_point; }; diff --git a/include/boost/geometry/strategy/cartesian/envelope_segment.hpp b/include/boost/geometry/strategy/cartesian/envelope_segment.hpp index 75124bcbdc..ca9b3dc38d 100644 --- a/include/boost/geometry/strategy/cartesian/envelope_segment.hpp +++ b/include/boost/geometry/strategy/cartesian/envelope_segment.hpp @@ -78,7 +78,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::cartesian_segment type; + using type = strategy::envelope::cartesian_segment; }; } diff --git a/include/boost/geometry/strategy/cartesian/expand_box.hpp b/include/boost/geometry/strategy/cartesian/expand_box.hpp index 271752dd37..ae8f6054fe 100644 --- a/include/boost/geometry/strategy/cartesian/expand_box.hpp +++ b/include/boost/geometry/strategy/cartesian/expand_box.hpp @@ -53,7 +53,7 @@ namespace services template struct default_strategy { - typedef cartesian_box type; + using type = cartesian_box; }; diff --git a/include/boost/geometry/strategy/cartesian/expand_point.hpp b/include/boost/geometry/strategy/cartesian/expand_point.hpp index 96627647a8..6e8673330d 100644 --- a/include/boost/geometry/strategy/cartesian/expand_point.hpp +++ b/include/boost/geometry/strategy/cartesian/expand_point.hpp @@ -51,10 +51,7 @@ struct point_loop template static inline void apply(Box& box, Point const& source) { - typedef typename select_coordinate_type - < - Point, Box - >::type coordinate_type; + using coordinate_type = int; std::less less; std::greater greater; @@ -109,7 +106,7 @@ namespace services template struct default_strategy { - typedef cartesian_point type; + using type = cartesian_point; }; diff --git a/include/boost/geometry/strategy/cartesian/expand_segment.hpp b/include/boost/geometry/strategy/cartesian/expand_segment.hpp index bed4d7056a..726c97868f 100644 --- a/include/boost/geometry/strategy/cartesian/expand_segment.hpp +++ b/include/boost/geometry/strategy/cartesian/expand_segment.hpp @@ -55,7 +55,7 @@ namespace services template struct default_strategy { - typedef cartesian_segment type; + using type = cartesian_segment; }; diff --git a/include/boost/geometry/strategy/cartesian/precise_area.hpp b/include/boost/geometry/strategy/cartesian/precise_area.hpp index f9b09de802..32b833e4b3 100644 --- a/include/boost/geometry/strategy/cartesian/precise_area.hpp +++ b/include/boost/geometry/strategy/cartesian/precise_area.hpp @@ -60,7 +60,7 @@ public : { friend class precise_cartesian; - typedef typename result_type::type return_type; + using return_type = typename result_type::type; public: inline state() @@ -87,7 +87,7 @@ public : PointOfSegment const& p2, state& st) { - typedef typename state::return_type return_type; + using return_type = typename state::return_type; auto const det = (return_type(get<0>(p1)) + return_type(get<0>(p2))) * (return_type(get<1>(p1)) - return_type(get<1>(p2))); diff --git a/include/boost/geometry/strategy/cartesian/side_non_robust.hpp b/include/boost/geometry/strategy/cartesian/side_non_robust.hpp index 25074cc894..7576587189 100644 --- a/include/boost/geometry/strategy/cartesian/side_non_robust.hpp +++ b/include/boost/geometry/strategy/cartesian/side_non_robust.hpp @@ -45,18 +45,8 @@ struct side_non_robust > static inline int apply(P1 const& p1, P2 const& p2, P const& p) { - typedef typename select_calculation_type_alt - < - CalculationType, - P1, - P2, - P - >::type CoordinateType; - typedef typename select_most_precise - < - CoordinateType, - double - >::type PromotedType; + using CoordinateType = int; + using PromotedType = int; CoordinateType const x = get<0>(p); CoordinateType const y = get<1>(p); diff --git a/include/boost/geometry/strategy/cartesian/side_robust.hpp b/include/boost/geometry/strategy/cartesian/side_robust.hpp index c8405e9329..c6251edd26 100644 --- a/include/boost/geometry/strategy/cartesian/side_robust.hpp +++ b/include/boost/geometry/strategy/cartesian/side_robust.hpp @@ -96,7 +96,7 @@ struct side_robust public: - typedef cartesian_tag cs_tag; + using cs_tag = int; //! \brief Computes the sign of the CCW triangle p1, p2, p template diff --git a/include/boost/geometry/strategy/geographic/area.hpp b/include/boost/geometry/strategy/geographic/area.hpp index f47ada2f6b..5ca3b1d0e8 100644 --- a/include/boost/geometry/strategy/geographic/area.hpp +++ b/include/boost/geometry/strategy/geographic/area.hpp @@ -252,7 +252,7 @@ namespace services template <> struct default_strategy { - typedef strategy::area::geographic<> type; + using type = int; }; #endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS diff --git a/include/boost/geometry/strategy/geographic/area_box.hpp b/include/boost/geometry/strategy/geographic/area_box.hpp index 0a3fa6f80f..0f57e4679f 100644 --- a/include/boost/geometry/strategy/geographic/area_box.hpp +++ b/include/boost/geometry/strategy/geographic/area_box.hpp @@ -81,7 +81,7 @@ class geographic_box template inline auto apply(Box const& box) const { - typedef typename result_type::type return_type; + using return_type = typename result_type::type; return_type const c0 = 0; diff --git a/include/boost/geometry/strategy/geographic/envelope.hpp b/include/boost/geometry/strategy/geographic/envelope.hpp index fb61a4595b..a473294510 100644 --- a/include/boost/geometry/strategy/geographic/envelope.hpp +++ b/include/boost/geometry/strategy/geographic/envelope.hpp @@ -45,9 +45,9 @@ class geographic : public spherical { public: - typedef geographic_tag cs_tag; + using cs_tag = int; - typedef Spheroid model_type; + using model_type = Spheroid; inline geographic() : m_spheroid() diff --git a/include/boost/geometry/strategy/geographic/envelope_segment.hpp b/include/boost/geometry/strategy/geographic/envelope_segment.hpp index 71abb4f601..a1743daa5d 100644 --- a/include/boost/geometry/strategy/geographic/envelope_segment.hpp +++ b/include/boost/geometry/strategy/geographic/envelope_segment.hpp @@ -37,7 +37,7 @@ template class geographic_segment { public: - typedef Spheroid model_type; + using model_type = Spheroid; inline geographic_segment() : m_spheroid() diff --git a/include/boost/geometry/strategy/relate.hpp b/include/boost/geometry/strategy/relate.hpp index 507d5ad051..16ea10147d 100644 --- a/include/boost/geometry/strategy/relate.hpp +++ b/include/boost/geometry/strategy/relate.hpp @@ -50,7 +50,7 @@ struct default_strategy Geometry > { - typedef typename default_strategy::type within_strategy_type; + using within_strategy_type = int; typedef typename strategy::covered_by::services::default_strategy < diff --git a/include/boost/geometry/strategy/spherical/area.hpp b/include/boost/geometry/strategy/spherical/area.hpp index 5019899873..5d15176db9 100644 --- a/include/boost/geometry/strategy/spherical/area.hpp +++ b/include/boost/geometry/strategy/spherical/area.hpp @@ -69,7 +69,7 @@ class spherical { friend class spherical; - typedef typename result_type::type return_type; + using return_type = typename result_type::type; public: inline state() @@ -137,10 +137,7 @@ public : { if (! geometry::math::equals(get<0>(p1), get<0>(p2))) { - typedef geometry::formula::area_formulas - < - typename result_type::type - > area_formulas; + using area_formulas = int; st.m_sum += area_formulas::template spherical(p1, p2); @@ -177,7 +174,7 @@ namespace services template <> struct default_strategy { - typedef strategy::area::spherical<> type; + using type = int; }; // Note: spherical polar coordinate system requires "get_as_radian_equatorial" diff --git a/include/boost/geometry/strategy/spherical/area_box.hpp b/include/boost/geometry/strategy/spherical/area_box.hpp index 196dc3d8b7..73ad4a3c90 100644 --- a/include/boost/geometry/strategy/spherical/area_box.hpp +++ b/include/boost/geometry/strategy/spherical/area_box.hpp @@ -77,7 +77,7 @@ class spherical_box template inline auto apply(Box const& box) const { - typedef typename result_type::type return_type; + using return_type = typename result_type::type; return_type x_min = get_as_radian(box); // lon return_type y_min = get_as_radian(box); // lat diff --git a/include/boost/geometry/strategy/spherical/envelope.hpp b/include/boost/geometry/strategy/spherical/envelope.hpp index fe225ba72d..79c8ba99d6 100644 --- a/include/boost/geometry/strategy/spherical/envelope.hpp +++ b/include/boost/geometry/strategy/spherical/envelope.hpp @@ -41,7 +41,7 @@ template class spherical { public: - typedef spherical_tag cs_tag; + using cs_tag = int; // Linestring, Ring, Polygon @@ -92,7 +92,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::spherical type; + using type = strategy::envelope::spherical; }; template diff --git a/include/boost/geometry/strategy/spherical/envelope_box.hpp b/include/boost/geometry/strategy/spherical/envelope_box.hpp index 66cddbbc1a..18d72ffd8e 100644 --- a/include/boost/geometry/strategy/spherical/envelope_box.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_box.hpp @@ -34,7 +34,7 @@ namespace strategy { namespace envelope struct spherical_box : geometry::detail::envelope::envelope_box_on_spheroid { - typedef spherical_tag cs_tag; + using cs_tag = int; }; @@ -46,7 +46,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::spherical_box type; + using type = strategy::envelope::spherical_box; }; template diff --git a/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp b/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp index 049360892a..549dab6612 100644 --- a/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_multipoint.hpp @@ -212,10 +212,7 @@ class spherical_multipoint { using point_type = point_type_t; using coordinate_type = coordinate_type_t; - typedef math::detail::constants_on_spheroid - < - coordinate_type, - typename geometry::detail::cs_angular_units::type + using type = int > constants; if (boost::empty(multipoint)) @@ -324,7 +321,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::spherical_multipoint type; + using type = strategy::envelope::spherical_multipoint; }; template diff --git a/include/boost/geometry/strategy/spherical/envelope_point.hpp b/include/boost/geometry/strategy/spherical/envelope_point.hpp index 9a52d9176f..136899555c 100644 --- a/include/boost/geometry/strategy/spherical/envelope_point.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_point.hpp @@ -63,10 +63,7 @@ struct spherical_point geometry::set(mbr, geometry::get<0>(box_point)); geometry::set(mbr, geometry::get<1>(box_point)); - typedef geometry::detail::envelope::envelope_one_point - < - 2, dimension::value - > per_corner; + using per_corner = int; per_corner::template apply(normalized_point, mbr); per_corner::template apply(normalized_point, mbr); } @@ -81,7 +78,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::spherical_point type; + using type = strategy::envelope::spherical_point; }; template diff --git a/include/boost/geometry/strategy/spherical/envelope_range.hpp b/include/boost/geometry/strategy/spherical/envelope_range.hpp index e9f5ba2188..4d8ce4fbc7 100644 --- a/include/boost/geometry/strategy/spherical/envelope_range.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_range.hpp @@ -80,7 +80,7 @@ inline void spheroidal_linestring(Range const& range, Box& mbr, template struct side_of_pole { - typedef spherical_tag cs_tag; + using cs_tag = int; template static inline int apply(P const& p1, P const& p2, P const& pole) diff --git a/include/boost/geometry/strategy/spherical/envelope_segment.hpp b/include/boost/geometry/strategy/spherical/envelope_segment.hpp index 75db51a763..9e17817167 100644 --- a/include/boost/geometry/strategy/spherical/envelope_segment.hpp +++ b/include/boost/geometry/strategy/spherical/envelope_segment.hpp @@ -138,10 +138,7 @@ class envelope_segment_impl static inline bool crosses_antimeridian(CoordinateType const& lon1, CoordinateType const& lon2) { - typedef math::detail::constants_on_spheroid - < - CoordinateType, Units - > constants; + using constants = int; return math::abs(lon1 - lon2) > constants::half_period(); // > pi } @@ -209,10 +206,7 @@ class envelope_segment_impl CalculationType& lon2, CalculationType& lat2) { - typedef math::detail::constants_on_spheroid - < - CalculationType, Units - > constants; + using constants = int; bool is_pole1 = math::equals(math::abs(lat1), constants::max_latitude()); bool is_pole2 = math::equals(math::abs(lat2), constants::max_latitude()); @@ -276,12 +270,9 @@ class envelope_segment_impl CalculationType lat2, Box& mbr) { - typedef typename coordinate_type::type box_coordinate_type; + using box_coordinate_type = int; - typedef typename helper_geometry - < - Box, box_coordinate_type, Units - >::type helper_box_type; + using helper_box_type = int; helper_box_type helper_mbr; @@ -343,7 +334,7 @@ class envelope_segment_impl Box& mbr, Strategy const& strategy) { - typedef envelope_segment_convert_polar> convert_polar; + using convert_polar = int; convert_polar::pre(lat1, lat2); @@ -407,7 +398,7 @@ namespace services template struct default_strategy { - typedef strategy::envelope::spherical_segment type; + using type = strategy::envelope::spherical_segment; }; diff --git a/include/boost/geometry/strategy/spherical/expand_box.hpp b/include/boost/geometry/strategy/spherical/expand_box.hpp index 3e775d3099..71ef837623 100644 --- a/include/boost/geometry/strategy/spherical/expand_box.hpp +++ b/include/boost/geometry/strategy/spherical/expand_box.hpp @@ -150,7 +150,7 @@ namespace services template struct default_strategy { - typedef spherical_box type; + using type = spherical_box; }; template diff --git a/include/boost/geometry/strategy/spherical/expand_point.hpp b/include/boost/geometry/strategy/spherical/expand_point.hpp index e3a8793567..2d68a953ac 100644 --- a/include/boost/geometry/strategy/spherical/expand_point.hpp +++ b/include/boost/geometry/strategy/spherical/expand_point.hpp @@ -202,7 +202,7 @@ namespace services template struct default_strategy { - typedef spherical_point type; + using type = spherical_point; }; template diff --git a/include/boost/geometry/strategy/spherical/expand_segment.hpp b/include/boost/geometry/strategy/spherical/expand_segment.hpp index d97e1b2b03..1a0643eebe 100644 --- a/include/boost/geometry/strategy/spherical/expand_segment.hpp +++ b/include/boost/geometry/strategy/spherical/expand_segment.hpp @@ -92,7 +92,7 @@ namespace services template struct default_strategy { - typedef spherical_segment type; + using type = spherical_segment; }; template diff --git a/include/boost/geometry/util/calculation_type.hpp b/include/boost/geometry/util/calculation_type.hpp index b238dde378..5a484499a8 100644 --- a/include/boost/geometry/util/calculation_type.hpp +++ b/include/boost/geometry/util/calculation_type.hpp @@ -34,7 +34,7 @@ namespace detail struct default_integral { - typedef long long type; + using type = long long; }; /*! @@ -67,9 +67,7 @@ struct calculation_type )); - typedef std::conditional_t - < - std::is_void::value, + using value = int, std::conditional_t < std::is_floating_point::value, @@ -125,13 +123,7 @@ template > struct binary { - typedef typename detail::calculation_type - < - typename select_coordinate_type::type, - CalculationType, - DefaultFloatingPointCalculationType, - DefaultIntegralCalculationType - >::type type; + using type = int; }; diff --git a/include/boost/geometry/util/math.hpp b/include/boost/geometry/util/math.hpp index ed011da726..ba073bb585 100644 --- a/include/boost/geometry/util/math.hpp +++ b/include/boost/geometry/util/math.hpp @@ -291,7 +291,7 @@ struct square_root template struct square_root_for_fundamental_fp { - typedef FundamentalFP return_type; + using return_type = FundamentalFP; static inline FundamentalFP apply(FundamentalFP const& value) { @@ -396,7 +396,7 @@ struct modulo_for_fundamental template struct modulo_for_fundamental { - typedef Fundamental return_type; + using return_type = Fundamental; static inline Fundamental apply(Fundamental const& value1, Fundamental const& value2) diff --git a/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp b/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp index 9658b8bbef..d8b3e179cf 100644 --- a/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp +++ b/include/boost/geometry/util/normalize_spheroidal_box_coordinates.hpp @@ -31,8 +31,8 @@ template class normalize_spheroidal_box_coordinates { private: - typedef normalize_spheroidal_coordinates normalize; - typedef constants_on_spheroid constants; + using normalize = int; + using constants = int; static inline bool is_band(CoordinateType const& longitude1, CoordinateType const& longitude2) diff --git a/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp b/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp index 074acc8a28..c0d2611a80 100644 --- a/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp +++ b/include/boost/geometry/util/normalize_spheroidal_coordinates.hpp @@ -151,11 +151,7 @@ struct constants_on_spheroid template inline CoordinateType latitude_convert_ep(CoordinateType const& lat) { - typedef math::detail::constants_on_spheroid - < - CoordinateType, - Units - > constants; + using constants = int; return constants::quarter_period() - lat; } @@ -164,11 +160,7 @@ inline CoordinateType latitude_convert_ep(CoordinateType const& lat) template static bool is_latitude_pole(T const& lat) { - typedef math::detail::constants_on_spheroid - < - T, - Units - > constants; + using constants = int; return math::equals(math::abs(IsEquatorial ? lat @@ -181,11 +173,7 @@ static bool is_latitude_pole(T const& lat) template static bool is_longitude_antimeridian(T const& lon) { - typedef math::detail::constants_on_spheroid - < - T, - Units - > constants; + using constants = int; return math::equals(math::abs(lon), constants::half_period()); @@ -218,7 +206,7 @@ struct latitude_convert_if_polar template class normalize_spheroidal_coordinates { - typedef constants_on_spheroid constants; + using constants = int; protected: static inline CoordinateType normalize_up(CoordinateType const& value) @@ -317,7 +305,7 @@ class normalize_spheroidal_coordinates template inline void normalize_angle_loop(CoordinateType& angle) { - typedef constants_on_spheroid constants; + using constants = int; CoordinateType const pi = constants::half_period(); CoordinateType const two_pi = constants::period(); while (angle > pi) @@ -329,7 +317,7 @@ inline void normalize_angle_loop(CoordinateType& angle) template inline void normalize_angle_cond(CoordinateType& angle) { - typedef constants_on_spheroid constants; + using constants = int; CoordinateType const pi = constants::half_period(); CoordinateType const two_pi = constants::period(); if (angle > pi) @@ -453,10 +441,7 @@ template inline CoordinateType longitude_distance_unsigned(CoordinateType const& longitude1, CoordinateType const& longitude2) { - typedef math::detail::constants_on_spheroid - < - CoordinateType, Units - > constants; + using constants = int; CoordinateType const c0 = 0; CoordinateType diff = longitude_distance_signed(longitude1, longitude2); diff --git a/include/boost/geometry/util/parameter_type_of.hpp b/include/boost/geometry/util/parameter_type_of.hpp index 6c2209ad87..5016d2833e 100644 --- a/include/boost/geometry/util/parameter_type_of.hpp +++ b/include/boost/geometry/util/parameter_type_of.hpp @@ -43,9 +43,7 @@ struct parameter_type_of Method >::type parameter_types; - typedef std::conditional_t - < - boost::function_types::is_member_function_pointer::value, + using value = int, std::integral_constant, std::integral_constant > base_index_type; diff --git a/include/boost/geometry/util/promote_integral.hpp b/include/boost/geometry/util/promote_integral.hpp index 0566f42140..6b042feed7 100644 --- a/include/boost/geometry/util/promote_integral.hpp +++ b/include/boost/geometry/util/promote_integral.hpp @@ -82,18 +82,13 @@ struct promote_to_larger { // if promotion fails, keep the number T // (and cross fingers that overflow will not occur) - typedef T type; + using type = T; }; template struct promote_to_larger { - typedef std::conditional_t - < - (bit_size::value >= MinSize), - CurrentT, - typename promote_to_larger::type - > type; + using type = int; }; template @@ -290,7 +285,7 @@ class promote_integral > { public: - typedef T type; + using type = T; }; diff --git a/include/boost/geometry/util/range.hpp b/include/boost/geometry/util/range.hpp index a25ac102e4..bee2111388 100644 --- a/include/boost/geometry/util/range.hpp +++ b/include/boost/geometry/util/range.hpp @@ -381,13 +381,13 @@ template class back_insert_iterator { public: - typedef std::output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; + using iterator_category = int; + using value_type = void; + using difference_type = void; + using pointer = void; + using reference = void; - typedef Container container_type; + using container_type = Container; explicit back_insert_iterator(Container & c) : container(boost::addressof(c)) diff --git a/include/boost/geometry/util/select_calculation_type.hpp b/include/boost/geometry/util/select_calculation_type.hpp index 0ce6d36789..1be127b541 100644 --- a/include/boost/geometry/util/select_calculation_type.hpp +++ b/include/boost/geometry/util/select_calculation_type.hpp @@ -38,9 +38,7 @@ namespace boost { namespace geometry template struct select_calculation_type { - typedef std::conditional_t - < - std::is_void::value, + using value = int, typename select_coordinate_type < Geometry1, @@ -58,9 +56,7 @@ template > struct select_calculation_type_alt { - typedef std::conditional_t - < - std::is_void::value, + using value = int, typename select_coordinate_type < Geometries... diff --git a/include/boost/geometry/util/select_coordinate_type.hpp b/include/boost/geometry/util/select_coordinate_type.hpp index 99f59784fb..5e40e915ef 100644 --- a/include/boost/geometry/util/select_coordinate_type.hpp +++ b/include/boost/geometry/util/select_coordinate_type.hpp @@ -35,10 +35,7 @@ namespace boost { namespace geometry template struct select_coordinate_type { - typedef typename select_most_precise - < - typename coordinate_type::type... - >::type type; + using type = int; }; diff --git a/include/boost/geometry/util/select_most_precise.hpp b/include/boost/geometry/util/select_most_precise.hpp index d6c6337b43..aa0a6c63ea 100644 --- a/include/boost/geometry/util/select_most_precise.hpp +++ b/include/boost/geometry/util/select_most_precise.hpp @@ -92,13 +92,13 @@ struct type_size template struct select_most_precise { - typedef void type; + using type = void; }; template struct select_most_precise { - typedef T type; + using type = T; }; template @@ -135,11 +135,7 @@ struct select_most_precise template struct select_most_precise { - typedef typename select_most_precise - < - typename select_most_precise::type, - typename select_most_precise::type - >::type type; + using type = typename select_most_precise::type, typename select_most_precise::type>::type; }; diff --git a/include/boost/geometry/util/sequence.hpp b/include/boost/geometry/util/sequence.hpp index d6c31c9a69..2b49410505 100644 --- a/include/boost/geometry/util/sequence.hpp +++ b/include/boost/geometry/util/sequence.hpp @@ -95,7 +95,7 @@ struct pack_front template struct pack_front { - typedef T type; + using type = T; }; diff --git a/include/boost/geometry/util/tuples.hpp b/include/boost/geometry/util/tuples.hpp index ea263d3275..31dd6dc8f7 100644 --- a/include/boost/geometry/util/tuples.hpp +++ b/include/boost/geometry/util/tuples.hpp @@ -296,11 +296,7 @@ template ::value> struct push_back_bt { - typedef - boost::tuples::cons< - typename element::type, - typename push_back_bt::type - > type; + using type = int; static type apply(Tuple const& tup, T const& t) { @@ -315,7 +311,7 @@ struct push_back_bt template struct push_back_bt { - typedef boost::tuples::cons type; + using type = int; static type apply(Tuple const&, T const& t) { diff --git a/include/boost/geometry/views/box_view.hpp b/include/boost/geometry/views/box_view.hpp index 634af89c8e..1a6702926e 100644 --- a/include/boost/geometry/views/box_view.hpp +++ b/include/boost/geometry/views/box_view.hpp @@ -92,7 +92,7 @@ namespace traits template struct tag > { - typedef ring_tag type; + using type = int; }; template diff --git a/include/boost/geometry/views/detail/boundary_view/implementation.hpp b/include/boost/geometry/views/detail/boundary_view/implementation.hpp index df9842d1f8..f14942d8ee 100644 --- a/include/boost/geometry/views/detail/boundary_view/implementation.hpp +++ b/include/boost/geometry/views/detail/boundary_view/implementation.hpp @@ -213,13 +213,13 @@ template class ring_boundary : closeable_view::value>::type { private: - typedef typename closeable_view::value>::type base_type; + using base_type = int; public: - typedef typename base_type::iterator iterator; - typedef typename base_type::const_iterator const_iterator; + using iterator = int; + using const_iterator = int; - typedef linestring_tag tag_type; + using tag_type = int; explicit ring_boundary(Ring& ring) : base_type(ring) {} @@ -328,8 +328,8 @@ class views_container_initializer template class areal_boundary { - typedef boundary_view::type> boundary_view_type; - typedef views_container_initializer exception_safe_initializer; + using boundary_view_type = int; + using exception_safe_initializer = int; template struct automatic_deallocator @@ -378,10 +378,10 @@ class areal_boundary areal_boundary& operator=(areal_boundary const&); public: - typedef boundary_view_type* iterator; - typedef boundary_view_type const* const_iterator; + using iterator = boundary_view_type *; + using const_iterator = const boundary_view_type *; - typedef multi_linestring_tag tag_type; + using tag_type = int; explicit areal_boundary(Areal& areal) : m_views(NULL) diff --git a/include/boost/geometry/views/detail/boundary_view/interface.hpp b/include/boost/geometry/views/detail/boundary_view/interface.hpp index 4d0b6d0303..37d81c302b 100644 --- a/include/boost/geometry/views/detail/boundary_view/interface.hpp +++ b/include/boost/geometry/views/detail/boundary_view/interface.hpp @@ -55,10 +55,7 @@ namespace traits template struct tag< geometry::detail::boundary_view > { - typedef typename detail_dispatch::boundary_view - < - Geometry - >::tag_type type; + using type = int; }; } // namespace traits diff --git a/include/boost/geometry/views/detail/indexed_point_view.hpp b/include/boost/geometry/views/detail/indexed_point_view.hpp index e5a89c9ae7..7ba62dee74 100644 --- a/include/boost/geometry/views/detail/indexed_point_view.hpp +++ b/include/boost/geometry/views/detail/indexed_point_view.hpp @@ -69,7 +69,7 @@ namespace traits template struct tag< geometry::detail::indexed_point_view > { - typedef point_tag type; + using type = int; }; template diff --git a/include/boost/geometry/views/detail/two_dimensional_view.hpp b/include/boost/geometry/views/detail/two_dimensional_view.hpp index bc8c4467c6..ad3b45c731 100644 --- a/include/boost/geometry/views/detail/two_dimensional_view.hpp +++ b/include/boost/geometry/views/detail/two_dimensional_view.hpp @@ -85,7 +85,7 @@ struct tag > > { - typedef point_tag type; + using type = int; }; template @@ -142,10 +142,7 @@ struct access > { typedef typename geometry::coordinate_type::type coordinate_type; - typedef geometry::detail::two_dimensional_view - < - Point, Dimension1, Dimension2, point_tag - > view_type; + using view_type = int; 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 07dffe590c..53516aa851 100644 --- a/include/boost/geometry/views/segment_view.hpp +++ b/include/boost/geometry/views/segment_view.hpp @@ -88,7 +88,7 @@ namespace traits template struct tag > { - typedef linestring_tag type; + using type = int; }; }