Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76217 - in trunk: boost/geometry/algorithms libs/geometry/test/multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2011-12-28 18:55:34


Author: bruno.lalande
Date: 2011-12-28 18:55:33 EST (Wed, 28 Dec 2011)
New Revision: 76217
URL: http://svn.boost.org/trac/boost/changeset/76217

Log:
Fixed a regression in dispatch::distance on the strategy reversal.
Text files modified:
   trunk/boost/geometry/algorithms/distance.hpp | 12 ++++++------
   trunk/libs/geometry/test/multi/algorithms/Jamfile.v2 | 1 +
   2 files changed, 7 insertions(+), 6 deletions(-)

Modified: trunk/boost/geometry/algorithms/distance.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/distance.hpp (original)
+++ trunk/boost/geometry/algorithms/distance.hpp 2011-12-28 18:55:33 EST (Wed, 28 Dec 2011)
@@ -321,19 +321,19 @@
               false
>
 {
- typedef typename detail::distance::default_strategy<Geometry2, Geometry1>::type Strategy;
-
- static inline typename strategy::distance::services::return_type<Strategy>::type apply(
+ typedef typename detail::distance::default_strategy<Geometry2, Geometry1>::type reversed_strategy;
+
+ static inline typename strategy::distance::services::return_type<reversed_strategy>::type apply(
         Geometry1 const& g1,
         Geometry2 const& g2,
- Strategy const& strategy)
+ typename detail::distance::default_strategy<Geometry1, Geometry2>::type const&)
     {
         return distance
             <
- Geometry2, Geometry1, Strategy,
+ Geometry2, Geometry1, reversed_strategy,
                 Tag2, Tag1, StrategyTag,
                 false
- >::apply(g2, g1, strategy);
+ >::apply(g2, g1, reversed_strategy());
     }
 };
 

Modified: trunk/libs/geometry/test/multi/algorithms/Jamfile.v2
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/Jamfile.v2 (original)
+++ trunk/libs/geometry/test/multi/algorithms/Jamfile.v2 2011-12-28 18:55:33 EST (Wed, 28 Dec 2011)
@@ -17,6 +17,7 @@
     [ run multi_correct.cpp ]
     [ run multi_covered_by.cpp ]
     [ run multi_difference.cpp ]
+ [ run multi_distance.cpp ]
     [ run multi_envelope.cpp ]
     [ run multi_equals.cpp ]
     [ run multi_for_each.cpp ]


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