[strategies] make default_strategy class commutative with respect

to the order of the geometry tags
This commit is contained in:
Menelaos Karavelas
2014-05-29 14:53:51 +03:00
parent f989738ebe
commit e15cbf41a4
3 changed files with 42 additions and 0 deletions

View File

@@ -251,6 +251,20 @@ struct default_strategy
> type;
};
template <typename PointOfSegment, typename Point, typename Strategy>
struct default_strategy
<
segment_tag, point_tag, PointOfSegment, Point,
cartesian_tag, cartesian_tag, Strategy
>
{
typedef typename default_strategy
<
point_tag, segment_tag, Point, PointOfSegment,
cartesian_tag, cartesian_tag, Strategy
>::type type;
};
} // namespace services
#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS

View File

@@ -322,6 +322,18 @@ struct default_strategy
typedef pythagoras_point_box<> type;
};
template <typename Box, typename Point>
struct default_strategy
<
box_tag, point_tag, Box, Point, cartesian_tag, cartesian_tag
>
{
typedef typename default_strategy
<
point_tag, box_tag, Point, Box, cartesian_tag, cartesian_tag
>::type type;
};
} // namespace services
#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS

View File

@@ -306,6 +306,22 @@ struct default_strategy
};
template <typename PointOfSegment, typename Point, typename Strategy>
struct default_strategy
<
segment_tag, point_tag, PointOfSegment, Point,
spherical_equatorial_tag, spherical_equatorial_tag,
Strategy
>
{
typedef typename default_strategy
<
point_tag, segment_tag, Point, PointOfSegment,
spherical_equatorial_tag, spherical_equatorial_tag,
Strategy
>::type type;
};
} // namespace services
#endif // DOXYGEN_NO_STRATEGY_SPECIALIZATIONS