|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76669 - in trunk/boost/geometry: algorithms multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-01-24 15:15:06
Author: bruno.lalande
Date: 2012-01-24 15:15:05 EST (Tue, 24 Jan 2012)
New Revision: 76669
URL: http://svn.boost.org/trac/boost/changeset/76669
Log:
Made dispatch::correct able to retrieve the tag by itself.
Text files modified:
trunk/boost/geometry/algorithms/correct.hpp | 16 ++++++++--------
trunk/boost/geometry/multi/algorithms/correct.hpp | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
Modified: trunk/boost/geometry/algorithms/correct.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/correct.hpp (original)
+++ trunk/boost/geometry/algorithms/correct.hpp 2012-01-24 15:15:05 EST (Tue, 24 Jan 2012)
@@ -193,7 +193,7 @@
namespace dispatch
{
-template <typename Tag, typename Geometry>
+template <typename Geometry, typename Tag = typename tag<Geometry>::type>
struct correct
{
BOOST_MPL_ASSERT_MSG
@@ -204,28 +204,28 @@
};
template <typename Point>
-struct correct<point_tag, Point>
+struct correct<Point, point_tag>
: detail::correct::correct_nop<Point>
{};
template <typename LineString>
-struct correct<linestring_tag, LineString>
+struct correct<LineString, linestring_tag>
: detail::correct::correct_nop<LineString>
{};
template <typename Segment>
-struct correct<segment_tag, Segment>
+struct correct<Segment, segment_tag>
: detail::correct::correct_nop<Segment>
{};
template <typename Box>
-struct correct<box_tag, Box>
+struct correct<Box, box_tag>
: detail::correct::correct_box<Box>
{};
template <typename Ring>
-struct correct<ring_tag, Ring>
+struct correct<Ring, ring_tag>
: detail::correct::correct_ring
<
Ring,
@@ -234,7 +234,7 @@
{};
template <typename Polygon>
-struct correct<polygon_tag, Polygon>
+struct correct<Polygon, polygon_tag>
: detail::correct::correct_polygon<Polygon>
{};
@@ -260,7 +260,7 @@
{
concept::check<Geometry const>();
- dispatch::correct<typename tag<Geometry>::type, Geometry>::apply(geometry);
+ dispatch::correct<Geometry>::apply(geometry);
}
Modified: trunk/boost/geometry/multi/algorithms/correct.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/correct.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/correct.hpp 2012-01-24 15:15:05 EST (Tue, 24 Jan 2012)
@@ -32,19 +32,19 @@
{
template <typename MultiPoint>
-struct correct<multi_point_tag, MultiPoint>
+struct correct<MultiPoint, multi_point_tag>
: detail::correct::correct_nop<MultiPoint>
{};
template <typename MultiLineString>
-struct correct<multi_linestring_tag, MultiLineString>
+struct correct<MultiLineString, multi_linestring_tag>
: detail::correct::correct_nop<MultiLineString>
{};
template <typename Geometry>
-struct correct<multi_polygon_tag, Geometry>
+struct correct<Geometry, multi_polygon_tag>
: detail::multi_modify
<
Geometry,
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