|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75833 - in trunk: boost/geometry/algorithms boost/geometry/multi/algorithms libs/geometry/doc/src/docutils/tools/support_status
From: bruno.lalande_at_[hidden]
Date: 2011-12-06 19:04:54
Author: bruno.lalande
Date: 2011-12-06 19:04:53 EST (Tue, 06 Dec 2011)
New Revision: 75833
URL: http://svn.boost.org/trac/boost/changeset/75833
Log:
Defaulted another template parameter of dispatch::convert.
Text files modified:
trunk/boost/geometry/algorithms/assign.hpp | 1
trunk/boost/geometry/algorithms/convert.hpp | 48 ++++++++++++++++++++--------------------
trunk/boost/geometry/multi/algorithms/convert.hpp | 13 +++-------
trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp | 1
4 files changed, 28 insertions(+), 35 deletions(-)
Modified: trunk/boost/geometry/algorithms/assign.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/assign.hpp (original)
+++ trunk/boost/geometry/algorithms/assign.hpp 2011-12-06 19:04:53 EST (Tue, 06 Dec 2011)
@@ -165,7 +165,6 @@
dispatch::convert
<
- false,
typename tag<Geometry2>::type,
typename tag<Geometry1>::type,
Geometry2,
Modified: trunk/boost/geometry/algorithms/convert.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/convert.hpp (original)
+++ trunk/boost/geometry/algorithms/convert.hpp 2011-12-06 19:04:53 EST (Tue, 06 Dec 2011)
@@ -214,10 +214,11 @@
template
<
- bool UseAssignment,
typename Tag1, typename Tag2,
typename Geometry1, typename Geometry2,
- std::size_t DimensionCount = dimension<Geometry1>::type::value
+ std::size_t DimensionCount = dimension<Geometry1>::type::value,
+ bool UseAssignment = boost::is_same<Geometry1, Geometry2>::value
+ && !boost::is_array<Geometry1>::value
>
struct convert: boost::geometry::not_implemented<Geometry1, Geometry2>
{};
@@ -229,7 +230,7 @@
typename Geometry1, typename Geometry2,
std::size_t DimensionCount
>
-struct convert<true, Tag, Tag, Geometry1, Geometry2, DimensionCount>
+struct convert<Tag, Tag, Geometry1, Geometry2, DimensionCount, true>
{
// Same geometry type -> copy whole geometry
static inline void apply(Geometry1 const& source, Geometry2& destination)
@@ -244,7 +245,7 @@
typename Geometry1, typename Geometry2,
std::size_t DimensionCount
>
-struct convert<false, point_tag, point_tag, Geometry1, Geometry2, DimensionCount>
+struct convert<point_tag, point_tag, Geometry1, Geometry2, DimensionCount, false>
: detail::conversion::point_to_point<Geometry1, Geometry2, 0, DimensionCount>
{};
@@ -254,7 +255,7 @@
typename Box1, typename Box2,
std::size_t DimensionCount
>
-struct convert<false, box_tag, box_tag, Box1, Box2, DimensionCount>
+struct convert<box_tag, box_tag, Box1, Box2, DimensionCount, false>
: detail::conversion::indexed_to_indexed<Box1, Box2, 0, DimensionCount>
{};
@@ -264,19 +265,19 @@
typename Segment1, typename Segment2,
std::size_t DimensionCount
>
-struct convert<false, segment_tag, segment_tag, Segment1, Segment2, DimensionCount>
+struct convert<segment_tag, segment_tag, Segment1, Segment2, DimensionCount, false>
: detail::conversion::indexed_to_indexed<Segment1, Segment2, 0, DimensionCount>
{};
template <typename Segment, typename LineString, std::size_t DimensionCount>
-struct convert<false, segment_tag, linestring_tag, Segment, LineString, DimensionCount>
+struct convert<segment_tag, linestring_tag, Segment, LineString, DimensionCount, false>
: detail::conversion::segment_to_range<Segment, LineString>
{};
template <typename Ring1, typename Ring2, std::size_t DimensionCount>
-struct convert<false, ring_tag, ring_tag, Ring1, Ring2, DimensionCount>
+struct convert<ring_tag, ring_tag, Ring1, Ring2, DimensionCount, false>
: detail::conversion::range_to_range
<
Ring1,
@@ -287,17 +288,17 @@
{};
template <typename LineString1, typename LineString2, std::size_t DimensionCount>
-struct convert<false, linestring_tag, linestring_tag, LineString1, LineString2, DimensionCount>
+struct convert<linestring_tag, linestring_tag, LineString1, LineString2, DimensionCount, false>
: detail::conversion::range_to_range<LineString1, LineString2>
{};
template <typename Polygon1, typename Polygon2, std::size_t DimensionCount>
-struct convert<false, polygon_tag, polygon_tag, Polygon1, Polygon2, DimensionCount>
+struct convert<polygon_tag, polygon_tag, Polygon1, Polygon2, DimensionCount, false>
: detail::conversion::polygon_to_polygon<Polygon1, Polygon2>
{};
template <typename Box, typename Ring>
-struct convert<false, box_tag, ring_tag, Box, Ring, 2>
+struct convert<box_tag, ring_tag, Box, Ring, 2, false>
: detail::conversion::box_to_range
<
Box,
@@ -309,7 +310,7 @@
template <typename Box, typename Polygon>
-struct convert<false, box_tag, polygon_tag, Box, Polygon, 2>
+struct convert<box_tag, polygon_tag, Box, Polygon, 2, false>
{
static inline void apply(Box const& box, Polygon& polygon)
{
@@ -317,15 +318,16 @@
convert
<
- false, box_tag, ring_tag,
- Box, ring_type, 2
+ box_tag, ring_tag,
+ Box, ring_type,
+ 2, false
>::apply(box, exterior_ring(polygon));
}
};
template <typename Point, typename Box, std::size_t DimensionCount>
-struct convert<false, point_tag, box_tag, Point, Box, DimensionCount>
+struct convert<point_tag, box_tag, Point, Box, DimensionCount, false>
{
static inline void apply(Point const& point, Box& box)
{
@@ -342,22 +344,23 @@
template <typename Ring, typename Polygon, std::size_t DimensionCount>
-struct convert<false, ring_tag, polygon_tag, Ring, Polygon, DimensionCount>
+struct convert<ring_tag, polygon_tag, Ring, Polygon, DimensionCount, false>
{
static inline void apply(Ring const& ring, Polygon& polygon)
{
typedef typename ring_type<Polygon>::type ring_type;
convert
<
- false, ring_tag, ring_tag,
- Ring, ring_type, DimensionCount
+ ring_tag, ring_tag,
+ Ring, ring_type,
+ DimensionCount, false
>::apply(ring, exterior_ring(polygon));
}
};
template <typename Polygon, typename Ring, std::size_t DimensionCount>
-struct convert<false, polygon_tag, ring_tag, Polygon, Ring, DimensionCount>
+struct convert<polygon_tag, ring_tag, Polygon, Ring, DimensionCount, false>
{
static inline void apply(Polygon const& polygon, Ring& ring)
{
@@ -365,9 +368,9 @@
convert
<
- false,
ring_tag, ring_tag,
- ring_type, Ring, DimensionCount
+ ring_type, Ring,
+ DimensionCount, false
>::apply(exterior_ring(polygon), ring);
}
};
@@ -399,9 +402,6 @@
dispatch::convert
<
- boost::is_same<Geometry1, Geometry2>::value
- // && boost::has_assign<Geometry2>::value, -- type traits extensions
- && ! boost::is_array<Geometry1>::value,
typename tag_cast<typename tag<Geometry1>::type, multi_tag>::type,
typename tag_cast<typename tag<Geometry2>::type, multi_tag>::type,
Geometry1,
Modified: trunk/boost/geometry/multi/algorithms/convert.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/convert.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/convert.hpp 2011-12-06 19:04:53 EST (Tue, 06 Dec 2011)
@@ -74,18 +74,13 @@
// version types might be the same and therefore we call boost::is_same again
template <typename Multi1, typename Multi2, std::size_t DimensionCount>
-struct convert<false, multi_tag, multi_tag, Multi1, Multi2, DimensionCount>
+struct convert<multi_tag, multi_tag, Multi1, Multi2, DimensionCount, false>
: detail::conversion::multi_to_multi
<
Multi1,
Multi2,
convert
<
- boost::is_same
- <
- typename boost::range_value<Multi1>::type,
- typename boost::range_value<Multi2>::type
- >::value,
typename single_tag_of
<
typename tag<Multi1>::type
@@ -102,14 +97,13 @@
{};
template <typename SingleTag, typename Single, typename Multi, std::size_t DimensionCount>
-struct convert<false, SingleTag, multi_tag, Single, Multi, DimensionCount>
+struct convert<SingleTag, multi_tag, Single, Multi, DimensionCount, false>
: detail::conversion::single_to_multi
<
Single,
Multi,
convert
<
- false,
typename tag<Single>::type,
typename single_tag_of
<
@@ -117,7 +111,8 @@
>::type,
Single,
typename boost::range_value<Multi>::type,
- DimensionCount
+ DimensionCount,
+ false
>
>
{};
Modified: trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp 2011-12-06 19:04:53 EST (Tue, 06 Dec 2011)
@@ -49,7 +49,6 @@
template <typename G1, typename G2>
struct check_convert
: boost::geometry::dispatch::convert<
- boost::is_same<G1, G2>::value && !boost::is_array<G1>::value,
typename boost::geometry::tag_cast<typename boost::geometry::tag<G1>::type, boost::geometry::multi_tag>::type,
typename boost::geometry::tag_cast<typename boost::geometry::tag<G2>::type, boost::geometry::multi_tag>::type,
G1,
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk