chore: replace typedef with using in overlay

This commit is contained in:
Barend Gehrels 2024-11-05 20:17:22 +01:00
parent 2acb7eb0c3
commit e78a9fd3f5
36 changed files with 177 additions and 177 deletions

View File

@ -221,10 +221,10 @@ struct buffer_range
{
boost::ignore_unused(segment_strategy);
typedef typename std::iterator_traits
using point_type = typename std::iterator_traits
<
Iterator
>::value_type point_type;
>::value_type;
point_type second_point, penultimate_point, ultimate_point; // last two points from begin/end
@ -469,7 +469,7 @@ struct buffer_inserter_ring
{
output_point_type first_p1, first_p2, last_p1, last_p2;
typedef detail::buffer::buffer_range<RingOutput> buffer_range;
using buffer_range = detail::buffer::buffer_range<RingOutput>;
geometry::strategy::buffer::result_code result
= buffer_range::iterate(collection, begin, end,

View File

@ -39,7 +39,7 @@ namespace detail { namespace buffer
class backtrack_for_buffer
{
public :
typedef detail::overlay::backtrack_state state_type;
using state_type = detail::overlay::backtrack_state;
template
<
@ -148,7 +148,7 @@ struct buffer_turn_info
buffer_turn_operation<Point, SegmentRatio>
>
{
typedef Point point_type;
using point_type = Point;
std::size_t turn_index;

View File

@ -128,25 +128,25 @@ struct buffered_piece_collection
using coordinate_type = geometry::coordinate_type_t<Ring>;
// Ring/polygon type, always clockwise
typedef geometry::model::ring<point_type> clockwise_ring_type;
using clockwise_ring_type = geometry::model::ring<point_type>;
typedef geometry::model::box<point_type> box_type;
using box_type = geometry::model::box<point_type>;
typedef buffer_turn_info
using buffer_turn_info_type = buffer_turn_info
<
point_type,
typename segment_ratio_type<point_type>::type
> buffer_turn_info_type;
>;
typedef buffer_turn_operation
using buffer_turn_operation_type = buffer_turn_operation
<
point_type,
typename segment_ratio_type<point_type>::type
> buffer_turn_operation_type;
>;
typedef std::vector<buffer_turn_info_type> turn_vector_type;
using turn_vector_type = std::vector<buffer_turn_info_type>;
typedef piece_border<Ring, point_type> piece_border_type;
using piece_border_type = piece_border<Ring, point_type> ;
struct piece
{
@ -203,7 +203,7 @@ struct buffered_piece_collection
struct original_ring
{
typedef geometry::sections<box_type, 1> sections_type;
using sections_type = geometry::sections<box_type, 1>;
// 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<std::size_t, 0> dimensions;
using dimensions = std::integer_sequence<std::size_t, 0>;
geometry::sectionalize
<
false, dimensions
@ -239,7 +239,7 @@ struct buffered_piece_collection
bool m_has_interiors;
};
typedef std::vector<piece> piece_vector_type;
using piece_vector_type = std::vector<piece>;
piece_vector_type m_pieces;
turn_vector_type m_turns;
@ -258,15 +258,15 @@ struct buffered_piece_collection
segment_identifier current_segment_id;
// Monotonic sections (used for offsetted rings around points)
typedef geometry::sections<box_type, 2> sections_type;
using sections_type = geometry::sections<box_type, 2>;
sections_type monotonic_sections;
// Define the clusters, mapping cluster_id -> turns
typedef std::map
using cluster_type = std::map
<
signed_size_type,
detail::overlay::cluster_info
> cluster_type;
>;
cluster_type m_clusters;
@ -1028,14 +1028,14 @@ struct buffered_piece_collection
inline void traverse()
{
typedef detail::overlay::traverse
using traverser = detail::overlay::traverse
<
false, false,
buffered_ring_collection<buffered_ring<Ring> >,
buffered_ring_collection<buffered_ring<Ring > >,
overlay_buffer,
backtrack_for_buffer
> traverser;
>;
std::map<ring_identifier, overlay::ring_turn_info> turn_info_per_ring;
traversed_rings.clear();
@ -1065,14 +1065,14 @@ struct buffered_piece_collection
template <typename GeometryOutput, typename OutputIterator>
inline OutputIterator assign(OutputIterator out) const
{
typedef typename geometry::area_result
using area_result_type = typename geometry::area_result
<
buffered_ring<Ring>, Strategy
>::type area_result_type;
typedef detail::overlay::ring_properties
>::type;
using properties = detail::overlay::ring_properties
<
point_type, area_result_type
> properties;
>;
std::map<ring_identifier, properties> selected;

View File

@ -154,7 +154,7 @@ struct ring_type
detail::buffer::buffered_ring_collection<Ring>
>
{
typedef Ring type;
using type = Ring;
};

View File

@ -190,8 +190,8 @@ class piece_turn_visitor
inline void calculate_turns(Piece const& piece1, Piece const& piece2,
Section const& section1, Section const& section2)
{
typedef typename boost::range_value<Rings const>::type ring_type;
typedef typename boost::range_value<Turns const>::type turn_type;
using ring_type = typename boost::range_value<Rings const>::type;
using turn_type = typename boost::range_value<Turns const>::type;
signed_size_type const piece1_first_index = piece1.first_seg_id.segment_index;
signed_size_type const piece2_first_index = piece2.first_seg_id.segment_index;
@ -261,10 +261,10 @@ class piece_turn_visitor
{
unique_sub_range_from_piece<ring_type> unique_sub_range2(ring2, prev2, it2);
typedef detail::overlay::get_turn_info
using turn_policy = detail::overlay::get_turn_info
<
detail::overlay::assign_policy_only_start_turns
> turn_policy;
>;
turn_policy::apply(unique_sub_range1, unique_sub_range2,
the_model,
@ -292,9 +292,8 @@ public:
{
boost::ignore_unused(first);
typedef typename boost::range_value<Pieces const>::type piece_type;
piece_type const& piece1 = m_pieces[section1.ring_id.source_index];
piece_type const& piece2 = m_pieces[section2.ring_id.source_index];
auto const& piece1 = m_pieces[section1.ring_id.source_index];
auto const& piece2 = m_pieces[section2.ring_id.source_index];
if ( piece1.index == piece2.index
|| is_adjacent(piece1, piece2)

View File

@ -76,7 +76,7 @@ struct buffer_all<Input, Output, TagIn, multi_polygon_tag>
PointStrategy const& point_strategy,
Strategies const& strategies)
{
typedef typename boost::range_value<Output>::type polygon_type;
using polygon_type = typename boost::range_value<Output>::type;
if (geometry::is_empty(geometry_in))
{

View File

@ -475,7 +475,7 @@ private :
template <typename It>
inline void calculate_radii(Point const& center, It begin, It end)
{
typedef geometry::model::referring_segment<Point const> segment_type;
using segment_type = geometry::model::referring_segment<Point const>;
bool first = true;

View File

@ -75,10 +75,10 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
TupledOut& geometry_out,
Strategy const& strategy)
{
typedef typename geometry::detail::output_geometry_value
using single_out = typename geometry::detail::output_geometry_value
<
TupledOut
>::type single_out;
>::type;
boost::ignore_unused
<
@ -89,18 +89,18 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
>
>();
typedef geometry::detail::output_geometry_access
using areal = geometry::detail::output_geometry_access
<
single_out, polygon_tag, polygon_tag
> areal;
typedef geometry::detail::output_geometry_access
>;
using linear = geometry::detail::output_geometry_access
<
single_out, linestring_tag, linestring_tag
> linear;
typedef geometry::detail::output_geometry_access
>;
using pointlike = geometry::detail::output_geometry_access
<
single_out, point_tag, point_tag
> pointlike;
>;
// A * A -> A
call_intersection(areal1, areal2,
@ -124,15 +124,15 @@ struct intersection_areal_areal_<TupledOut, tupled_output_tag>
// however this results in static assert failure related to rescale policy
// After the removing of rescaling replacing boundary with areal geometry results in
// some tests failing.
typedef typename geometry::tuples::element
using areal_out_type = typename geometry::tuples::element
<
areal::index, TupledOut
>::type areal_out_type;
>::type;
typedef geometry::detail::boundary_view
using areal_out_boundary_type = geometry::detail::boundary_view
<
areal_out_type const
> areal_out_boundary_type;
>;
areal_out_boundary_type areal_out_boundary(areal::get(geometry_out));

View File

@ -49,14 +49,14 @@ struct intersection
GeometryOut& geometry_out,
Strategy const& strategy)
{
typedef typename geometry::detail::output_geometry_value
using single_out = typename geometry::detail::output_geometry_value
<
GeometryOut
>::type SingleOut;
>::type;
intersection_insert
<
Geometry1, Geometry2, SingleOut,
Geometry1, Geometry2, single_out,
overlay_intersection
>::apply(geometry1, geometry2,
geometry::detail::output_geometry_back_inserter(geometry_out),
@ -195,10 +195,10 @@ struct intersection<default_strategy, false>
GeometryOut & geometry_out,
default_strategy)
{
typedef typename strategies::relate::services::default_strategy
using strategy_type = typename strategies::relate::services::default_strategy
<
Geometry1, Geometry2
>::type strategy_type;
>::type;
return intersection
<

View File

@ -133,7 +133,7 @@ inline OutputIterator add_rings(SelectionMap const& map,
// everything is figured out yet (sum of positive/negative rings)
if (geometry::num_points(result) >= min_num_points)
{
typedef typename geometry::area_result<GeometryOut, Strategy>::type area_type;
using area_type = typename geometry::area_result<GeometryOut, Strategy>::type;
area_type const area = geometry::area(result, strategy);
area_type const zero = 0;
// Ignore if area is 0

View File

@ -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;

View File

@ -100,7 +100,7 @@ class backtrack_check_self_intersections
{}
};
public :
typedef state state_type;
using state_type = state;
template
<
@ -155,7 +155,7 @@ template
class backtrack_debug
{
public :
typedef backtrack_state state_type;
using state_type = backtrack_state;
template <typename Operation, typename Rings, typename Turns>
static inline void apply(std::size_t size_at_start,

View File

@ -54,7 +54,7 @@ template<typename Box, typename Point>
class liang_barsky
{
private:
typedef model::referring_segment<Point> segment_type;
using segment_type = model::referring_segment<Point>;
template <typename CoordinateType, typename CalcType>
inline bool check_edge(CoordinateType const& p, CoordinateType const& q, CalcType& t1, CalcType& t2) const
@ -90,7 +90,7 @@ public:
// 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 = strategy::within::cartesian_point_point;
static inline equals_point_point_strategy_type get_equals_point_point_strategy()
{

View File

@ -297,7 +297,7 @@ struct action_selector<overlay_intersection, RemoveSpikes>
template <bool RemoveSpikes>
struct action_selector<overlay_difference, RemoveSpikes>
{
typedef action_selector<overlay_intersection, RemoveSpikes> normal_action;
using normal_action = action_selector<overlay_intersection, RemoveSpikes>;
template
<
@ -382,14 +382,14 @@ template
>
class follow
{
typedef geometry::detail::output_geometry_access
using linear = geometry::detail::output_geometry_access
<
GeometryOut, linestring_tag, linestring_tag
> linear;
typedef geometry::detail::output_geometry_access
>;
using pointlike = geometry::detail::output_geometry_access
<
GeometryOut, point_tag, linestring_tag
> pointlike;
>;
public :
@ -413,17 +413,17 @@ public :
OutputIterator out,
Strategy const& strategy)
{
typedef following::action_selector<OverlayType, RemoveSpikes> action;
using action = following::action_selector<OverlayType, RemoveSpikes>;
// Sort intersection points on segments-along-linestring, and distance
// (like in enrich is done for poly/poly)
// sort turns by Linear seg_id, then by fraction, then
// for same ring id: x, u, i, c
// for different ring id: c, i, u, x
typedef relate::turns::less
using turn_less = relate::turns::less
<
0, relate::turns::less_op_linear_areal_single<0>, Strategy
> turn_less;
>;
std::sort(boost::begin(turns), boost::end(turns), turn_less());
typename linear::type current_piece;

View File

@ -181,16 +181,16 @@ class follow_linestring_linear
{
protected:
// allow spikes (false indicates: do not remove spikes)
typedef following::action_selector<OverlayType, false> action;
using action = following::action_selector<OverlayType, false>;
typedef geometry::detail::output_geometry_access
using linear = geometry::detail::output_geometry_access
<
GeometryOut, linestring_tag, linestring_tag
> linear;
typedef geometry::detail::output_geometry_access
>;
using pointlike = geometry::detail::output_geometry_access
<
GeometryOut, point_tag, linestring_tag
> pointlike;
>;
template
<
@ -363,20 +363,20 @@ class follow_multilinestring_linear
>
{
protected:
typedef typename boost::range_value<MultiLinestring>::type Linestring;
using linestring_t = typename boost::range_value<MultiLinestring>::type;
typedef follow_linestring_linear
using base_t = follow_linestring_linear
<
LinestringOut, Linestring, Linear,
LinestringOut, linestring_t, Linear,
OverlayType, FollowIsolatedPoints, FollowContinueTurns
> Base;
>;
typedef following::action_selector<OverlayType> action;
using action = following::action_selector<OverlayType>;
typedef typename boost::range_iterator
using linestring_iterator = typename boost::range_iterator
<
MultiLinestring const
>::type linestring_iterator;
>::type;
template <typename OutputIt, overlay_type OT>
@ -439,10 +439,10 @@ public:
{
BOOST_GEOMETRY_ASSERT( first != beyond );
typedef copy_linestrings_in_range
using copy_linestrings = copy_linestrings_in_range
<
OutputIterator, OverlayType
> copy_linestrings;
>;
linestring_iterator ls_first = boost::begin(multilinestring);
linestring_iterator ls_beyond = boost::end(multilinestring);
@ -464,7 +464,7 @@ public:
per_ls_next = std::find_if(per_ls_current, beyond,
has_other_multi_id(current_multi_id));
oit = Base::apply(*(ls_first + current_multi_id),
oit = base_t::apply(*(ls_first + current_multi_id),
linear, per_ls_current, per_ls_next, oit, strategy);
signed_size_type next_multi_id = -1;

View File

@ -55,12 +55,12 @@ 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
using policy_type = policies::relate::segments_intersection_points
<
segment_intersection_points<turn_point_type>
> policy_type;
>;
typename policy_type::return_type const result
= strategy.relate().apply(range_p, range_q, policy_type());
@ -96,12 +96,12 @@ inline void get_intersection_points(Geometry1 const& geometry1,
{
concepts::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
typedef detail::get_intersection_points::get_turn_without_info
<
point_type_t<Geometry1>,
point_type_t<Geometry2>,
typename boost::range_value<Turns>::type
> TurnPolicy;
using turn_policy_t = detail::get_intersection_points::get_turn_without_info
<
point_type_t<Geometry1>,
point_type_t<Geometry2>,
typename boost::range_value<Turns>::type
>;
detail::get_turns::no_interrupt_policy interrupt_policy;
@ -114,7 +114,7 @@ inline void get_intersection_points(Geometry1 const& geometry1,
tag_t<Geometry2>,
Geometry1, Geometry2,
false, false,
TurnPolicy
turn_policy_t
>,
dispatch::get_turns
<
@ -122,7 +122,7 @@ inline void get_intersection_points(Geometry1 const& geometry1,
tag_t<Geometry2>,
Geometry1, Geometry2,
false, false,
TurnPolicy
turn_policy_t
>
>::apply(0, geometry1,
1, geometry2,

View File

@ -1397,12 +1397,12 @@ struct get_turn_info
UmbrellaStrategy const& umbrella_strategy,
OutputIterator out)
{
typedef intersection_info
using inters_info = intersection_info
<
UniqueSubRange1, UniqueSubRange2,
typename TurnInfo::point_type,
UmbrellaStrategy
> inters_info;
>;
inters_info inters(range_p, range_q, umbrella_strategy);

View File

@ -231,7 +231,7 @@ private:
template <bool EnableFirst, bool EnableLast>
struct get_turn_info_for_endpoint
{
typedef std::pair<operation_type, operation_type> operations_pair;
using operations_pair = std::pair<operation_type, operation_type>;
BOOST_STATIC_ASSERT(EnableFirst || EnableLast);

View File

@ -48,7 +48,7 @@ template
>
struct side_calculator
{
typedef decltype(std::declval<Strategy>().side()) side_strategy_type;
using side_strategy_type = decltype(std::declval<Strategy>().side());
inline side_calculator(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,
@ -97,23 +97,23 @@ class intersection_info_base
{
public:
typedef segment_intersection_points<TurnPoint> intersection_point_type;
typedef policies::relate::segments_intersection_policy
using intersection_point_type = segment_intersection_points<TurnPoint>;
using intersection_policy_type = policies::relate::segments_intersection_policy
<
intersection_point_type
> intersection_policy_type;
>;
typedef typename intersection_policy_type::return_type result_type;
using result_type = typename intersection_policy_type::return_type;
typedef side_calculator
using side_calculator_type = side_calculator
<
UniqueSubRange1, UniqueSubRange2, UmbrellaStrategy
> side_calculator_type;
>;
typedef side_calculator
using swapped_side_calculator_type = side_calculator
<
UniqueSubRange2, UniqueSubRange1, UmbrellaStrategy
> swapped_side_calculator_type;
>;
intersection_info_base(UniqueSubRange1 const& range_p,
UniqueSubRange2 const& range_q,

View File

@ -54,12 +54,12 @@ struct get_turn_info_linear_areal
UmbrellaStrategy const& umbrella_strategy,
OutputIterator out)
{
typedef intersection_info
using inters_info = intersection_info
<
UniqueSubRange1, UniqueSubRange2,
typename TurnInfo::point_type,
UmbrellaStrategy
> inters_info;
>;
inters_info inters(range_p, range_q, umbrella_strategy);
@ -702,7 +702,7 @@ struct get_turn_info_linear_areal
Strategy const& strategy)
{
namespace ov = overlay;
typedef ov::get_turn_info_for_endpoint<EnableFirst, EnableLast> get_info_e;
using get_info_e = ov::get_turn_info_for_endpoint<EnableFirst, EnableLast>;
std::size_t const ip_count = inters.i_info().count;
// no intersection points

View File

@ -49,12 +49,12 @@ struct get_turn_info_linear_linear
UmbrellaStrategy const& umbrella_strategy,
OutputIterator out)
{
typedef intersection_info
using inters_info = intersection_info
<
UniqueSubRange1, UniqueSubRange2,
typename TurnInfo::point_type,
UmbrellaStrategy
> inters_info;
>;
inters_info inters(range_p, range_q, umbrella_strategy);

View File

@ -357,7 +357,7 @@ public :
*prev2, *it2,
strategy);
typedef typename boost::range_value<Turns>::type turn_info;
using turn_info = typename boost::range_value<Turns>::type;
turn_info ti;
ti.operations[0].seg_id
@ -496,14 +496,14 @@ public:
InterruptPolicy& interrupt_policy)
{
// First create monotonic sections...
typedef typename boost::range_value<Turns>::type ip_type;
typedef typename ip_type::point_type point_type;
using ip_type = typename boost::range_value<Turns>::type;
using point_type = typename ip_type::point_type;
typedef model::box<point_type> box_type;
typedef geometry::sections<box_type, 2> sections_type;
using box_type = model::box<point_type>;
using sections_type = geometry::sections<box_type, 2>;
sections_type sec1, sec2;
typedef std::integer_sequence<std::size_t, 0, 1> dimensions;
using dimensions = std::integer_sequence<std::size_t, 0, 1>;
geometry::sectionalize<Reverse1, dimensions>(geometry1,
sec1, strategy, 0);
@ -555,7 +555,7 @@ struct get_turns_cs
struct unique_sub_range_from_box_policy
{
typedef box_point_type point_type;
using point_type = box_point_type;
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 = range_point_type;
unique_sub_range_from_view_policy(view_type const& view, point_type const& pi, point_type const& pj, iterator_type it)
: m_view(view)
@ -684,7 +684,7 @@ private:
// Depending on code some relations can be left out
typedef typename boost::range_value<Turns>::type turn_info;
using turn_info = typename boost::range_value<Turns>::type;
turn_info ti;
ti.operations[0].seg_id = seg_id;
@ -1014,8 +1014,10 @@ inline void get_turns(Geometry1 const& geometry1,
{
concepts::check_concepts_and_equal_dimensions<Geometry1 const, Geometry2 const>();
typedef detail::overlay::get_turn_info<AssignPolicy> TurnPolicy;
//typedef detail::get_turns::get_turn_info_type<Geometry1, Geometry2, AssignPolicy> TurnPolicy;
using turn_policy_t = detail::overlay::get_turn_info<AssignPolicy>;
// Using get_turn_info_type would be more generic. But that is currently not compiling,
// because it misses the is_collinear field as used later in the algorithm.
// using turn_policy_t = detail::get_turns::get_turn_info_type<Geometry1, Geometry2, AssignPolicy>;
std::conditional_t
<
@ -1026,7 +1028,7 @@ inline void get_turns(Geometry1 const& geometry1,
tag_t<Geometry2>,
Geometry1, Geometry2,
Reverse1, Reverse2,
TurnPolicy
turn_policy_t
>,
dispatch::get_turns
<
@ -1034,7 +1036,7 @@ inline void get_turns(Geometry1 const& geometry1,
tag_t<Geometry2>,
Geometry1, Geometry2,
Reverse1, Reverse2,
TurnPolicy
turn_policy_t
>
>::apply(0, geometry1,
1, geometry2,

View File

@ -260,7 +260,7 @@ template
inline void check_colocation(bool& has_blocked,
signed_size_type cluster_id, Turns const& turns, Clusters const& clusters)
{
typedef typename boost::range_value<Turns>::type turn_type;
using turn_type = typename boost::range_value<Turns>::type;
has_blocked = false;
@ -431,16 +431,15 @@ inline void gather_cluster_properties(Clusters& clusters, Turns& turns,
Geometry1 const& geometry1, Geometry2 const& geometry2,
Strategy const& strategy)
{
typedef typename boost::range_value<Turns>::type turn_type;
typedef typename turn_type::point_type point_type;
typedef typename turn_type::turn_operation_type turn_operation_type;
using turn_type = typename boost::range_value<Turns>::type;
using point_type = typename turn_type::point_type;
using turn_operation_type = typename turn_type::turn_operation_type;
// Define sorter, sorting counter-clockwise such that polygons are on the
// right side
typedef sort_by_side::side_sorter
// Define sorter, sorting counter-clockwise such that polygons are on the right side
using sbs_type = sort_by_side::side_sorter
<
Reverse1, Reverse2, OverlayType, point_type, Strategy, std::less<int>
> sbs_type;
>;
for (auto& pair : clusters)
{

View File

@ -117,7 +117,7 @@ struct intersection_linestring_linestring_point
OutputIterator out,
Strategy const& strategy)
{
typedef detail::overlay::turn_info<PointOut> turn_info;
using turn_info = detail::overlay::turn_info<PointOut>;
std::deque<turn_info> turns;
geometry::get_intersection_points(linestring1, linestring2,
@ -269,7 +269,7 @@ struct intersection_of_linestring_with_areal
return out;
}
typedef detail::overlay::follow
using follower = detail::overlay::follow
<
GeometryOut,
LineString,
@ -277,21 +277,21 @@ struct intersection_of_linestring_with_areal
OverlayType,
false, // do not remove spikes for linear geometries
FollowIsolatedPoints
> follower;
>;
typedef typename geometry::detail::output_geometry_access
using linear = typename geometry::detail::output_geometry_access
<
GeometryOut, linestring_tag, linestring_tag
> linear;
>;
using point_type = point_type_t<typename linear::type>;
typedef geometry::segment_ratio
using ratio_type = geometry::segment_ratio
<
coordinate_type_t<point_type>
> ratio_type;
>;
typedef detail::overlay::turn_info
using turn_info = detail::overlay::turn_info
<
point_type,
ratio_type,
@ -300,16 +300,16 @@ struct intersection_of_linestring_with_areal
point_type,
ratio_type
>
> turn_info;
>;
std::deque<turn_info> turns;
detail::get_turns::no_interrupt_policy policy;
typedef detail::overlay::get_turn_info_linear_areal
using turn_policy = detail::overlay::get_turn_info_linear_areal
<
detail::overlay::assign_null_policy
> turn_policy;
>;
dispatch::get_turns
<
@ -387,11 +387,11 @@ struct intersection_areal_areal_point
OutputIterator out,
Strategy const& strategy)
{
typedef detail::overlay::turn_info
using turn_info = detail::overlay::turn_info
<
PointOut,
typename segment_ratio_type<PointOut>::type
> turn_info;
>;
std::vector<turn_info> turns;
detail::get_turns::no_interrupt_policy policy;
@ -1463,10 +1463,10 @@ inline OutputIterator intersection_insert(Geometry1 const& geometry1,
concepts::check<Geometry1 const>();
concepts::check<Geometry2 const>();
typedef typename strategies::relate::services::default_strategy
using strategy_type = typename strategies::relate::services::default_strategy
<
Geometry1, Geometry2
>::type strategy_type;
>::type;
return intersection_insert<GeometryOut>(geometry1, geometry2, out,
strategy_type());

View File

@ -39,7 +39,7 @@ namespace detail { namespace overlay
template <typename TurnOperation>
struct indexed_turn_operation
{
typedef TurnOperation type;
using type = TurnOperation;
std::size_t turn_index;
std::size_t operation_index;

View File

@ -227,7 +227,7 @@ public:
OutputIterator oit,
Strategy const& strategy)
{
typedef typename detail::relate::turns::get_turns
using turn_info = typename detail::relate::turns::get_turns
<
Linear1,
Linear2,
@ -237,9 +237,9 @@ public:
Linear2,
assign_policy
>
>::template turn_info_type<Strategy>::type turn_info;
>::template turn_info_type<Strategy>::type;
typedef std::vector<turn_info> turns_container;
using turns_container = std::vector<turn_info>;
turns_container turns;
compute_turns(turns, linear1, linear2, strategy);

View File

@ -69,7 +69,7 @@ struct needs_self_turns<Geometry, multi_polygon_tag>
{
static inline bool apply(Geometry const& multi)
{
typedef typename boost::range_value<Geometry>::type polygon_type;
using polygon_type = typename boost::range_value<Geometry>::type;
std::size_t const n = boost::size(multi);
return n > 1 || (n == 1
&& needs_self_turns<polygon_type>

View File

@ -322,11 +322,11 @@ struct overlay
get_ring_turn_info<OverlayType>(turn_info_per_ring, turns, clusters);
typedef ring_properties
using properties = ring_properties
<
point_type,
typename geometry::area_result<ring_type, Strategy>::type
> properties;
>;
// Select all rings which are NOT touched by any intersection point
std::map<ring_identifier, properties> selected_ring_properties;

View File

@ -217,10 +217,10 @@ public:
OutputIterator oit,
Strategy const& strategy)
{
typedef std::vector
using point_vector_type = std::vector
<
typename boost::range_value<MultiPoint>::type
> point_vector_type;
>;
point_vector_type common_points;

View File

@ -217,8 +217,8 @@ private:
class segment_range
{
public:
typedef geometry::segment_iterator<Linear const> const_iterator;
typedef const_iterator iterator;
using const_iterator = geometry::segment_iterator<Linear const>;
using iterator = const_iterator;
explicit segment_range(Linear const& linear)
: m_linear(linear)
@ -273,10 +273,10 @@ public:
OutputIterator oit,
Strategy const& strategy)
{
typedef std::vector
using point_vector_type = std::vector
<
typename boost::range_value<MultiPoint>::type
> point_vector_type;
>;
point_vector_type common_points;

View File

@ -221,7 +221,7 @@ struct point_multipoint_point
OutputIterator oit,
Strategy const& strategy)
{
typedef action_selector_pl<PointOut, OverlayType> action;
using action = action_selector_pl<PointOut, OverlayType>;
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<void, -1, Strategy> less_type;
using less_type = geometry::less<void, -1, Strategy>;
if BOOST_GEOMETRY_CONSTEXPR (OverlayType != overlay_difference)
{
@ -268,7 +268,7 @@ struct multipoint_multipoint_point
}
}
typedef typename boost::range_value<MultiPoint2>::type point2_type;
using point2_type = typename boost::range_value<MultiPoint2>::type;
std::vector<point2_type> points2(boost::begin(multipoint2),
boost::end(multipoint2));

View File

@ -33,7 +33,7 @@ template
>
struct points_range
{
typedef geometry::point_iterator<Geometry const> iterator_type;
using iterator_type = geometry::point_iterator<Geometry const>;
explicit points_range(Geometry const& geometry)
: m_geometry(geometry)
@ -113,7 +113,7 @@ static inline int range_in_geometry(Geometry1 const& geometry1,
{
int result = 0;
points_range<Geometry1> points(geometry1);
typedef typename points_range<Geometry1>::iterator_type iterator_type;
using iterator_type = typename points_range<Geometry1>::iterator_type;
iterator_type const end = points.end();
iterator_type it = points.begin();
if (it == end)

View File

@ -30,8 +30,8 @@ namespace detail { namespace overlay
template <typename Point, typename AreaType>
struct ring_properties
{
typedef Point point_type;
typedef AreaType area_type;
using point_type = Point;
using area_type = AreaType;
bool valid;

View File

@ -151,7 +151,7 @@ namespace dispatch
ring_identifier id, RingPropertyMap& ring_properties,
Strategy const& strategy)
{
typedef select_rings<polygon_tag, typename boost::range_value<Multi>::type> per_polygon;
using per_polygon = select_rings<polygon_tag, typename boost::range_value<Multi>::type>;
id.multi_index = 0;
for (auto it = boost::begin(multi); it != boost::end(multi); ++it)

View File

@ -51,16 +51,16 @@ template
>
struct traversal_ring_creator
{
typedef traversal
using traversal_type = traversal
<
Reverse1, Reverse2, OverlayType,
Geometry1, Geometry2, Turns, Clusters,
Strategy,
Visitor
> traversal_type;
>;
typedef typename boost::range_value<Turns>::type turn_type;
typedef typename turn_type::turn_operation_type turn_operation_type;
using turn_type = typename boost::range_value<Turns>::type;
using turn_operation_type = typename turn_type::turn_operation_type;
static const operation_type target_operation
= operation_from_overlay<OverlayType>::value;
@ -254,7 +254,7 @@ struct traversal_ring_creator
Rings& rings, std::size_t& finalized_ring_size,
typename Backtrack::state_type& state)
{
typedef typename boost::range_value<Rings>::type ring_type;
using ring_type = typename boost::range_value<Rings>::type;
turn_operation_type const& start_op = start_turn.operations[op_index];

View File

@ -51,11 +51,11 @@ enum method_type
template <typename Point, typename SegmentRatio>
struct turn_operation
{
typedef SegmentRatio segment_ratio_type;
using segment_ratio_type = SegmentRatio;
operation_type operation;
segment_identifier seg_id;
SegmentRatio fraction;
segment_ratio_type fraction;
using comparable_distance_type = coordinate_type_t<Point>;
comparable_distance_type remaining_distance;
@ -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;