Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78804 - trunk/boost/geometry/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-06-03 18:48:03


Author: bruno.lalande
Date: 2012-06-03 18:48:02 EDT (Sun, 03 Jun 2012)
New Revision: 78804
URL: http://svn.boost.org/trac/boost/changeset/78804

Log:
Moved Strategy template param from class to function in intersection.
Text files modified:
   trunk/boost/geometry/algorithms/intersection.hpp | 29 +++++++++++++----------------
   1 files changed, 13 insertions(+), 16 deletions(-)

Modified: trunk/boost/geometry/algorithms/intersection.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/intersection.hpp (original)
+++ trunk/boost/geometry/algorithms/intersection.hpp 2012-06-03 18:48:02 EDT (Sun, 03 Jun 2012)
@@ -26,11 +26,11 @@
 <
     typename Box1, typename Box2,
     typename BoxOut,
- typename Strategy,
     std::size_t Dimension, std::size_t DimensionCount
>
 struct intersection_box_box
 {
+ template <typename Strategy>
     static inline bool apply(Box1 const& box1,
             Box2 const& box2, BoxOut& box_out,
             Strategy const& strategy)
@@ -52,7 +52,7 @@
 
         return intersection_box_box
             <
- Box1, Box2, BoxOut, Strategy,
+ Box1, Box2, BoxOut,
                 Dimension + 1, DimensionCount
>::apply(box1, box2, box_out, strategy);
     }
@@ -62,11 +62,11 @@
 <
     typename Box1, typename Box2,
     typename BoxOut,
- typename Strategy,
     std::size_t DimensionCount
>
-struct intersection_box_box<Box1, Box2, BoxOut, Strategy, DimensionCount, DimensionCount>
+struct intersection_box_box<Box1, Box2, BoxOut, DimensionCount, DimensionCount>
 {
+ template <typename Strategy>
     static inline bool apply(Box1 const&, Box2 const&, BoxOut&, Strategy const&)
     {
         return true;
@@ -88,13 +88,13 @@
 <
     typename Tag1, typename Tag2, typename TagOut,
     typename Geometry1, typename Geometry2,
- typename GeometryOut,
- typename Strategy
+ typename GeometryOut
>
 struct intersection
 {
     typedef std::back_insert_iterator<GeometryOut> output_iterator;
 
+ template <class Strategy>
     static inline bool apply(Geometry1 const& geometry1,
             Geometry2 const& geometry2,
             GeometryOut& geometry_out,
@@ -126,18 +126,15 @@
 template
 <
     typename Box1, typename Box2,
- typename BoxOut,
- typename Strategy
+ typename BoxOut
>
 struct intersection
     <
         box_tag, box_tag, box_tag,
- Box1, Box2, BoxOut,
- Strategy
+ Box1, Box2, BoxOut
> : public detail::intersection::intersection_box_box
             <
                 Box1, Box2, BoxOut,
- Strategy,
                 0, geometry::dimension<Box1>::value
>
 {};
@@ -147,11 +144,11 @@
 <
     typename Tag1, typename Tag2, typename TagOut,
     typename Geometry1, typename Geometry2,
- typename GeometryOut,
- typename Strategy
+ typename GeometryOut
>
 struct intersection_reversed
 {
+ template <class Strategy>
     static inline bool apply(Geometry1 const& geometry1,
             Geometry2 const& geometry2,
             GeometryOut& geometry_out,
@@ -161,7 +158,7 @@
             <
                 Tag2, Tag1, TagOut,
                 Geometry2, Geometry1,
- GeometryOut, Strategy
+ GeometryOut
>::apply(geometry2, geometry1, geometry_out, strategy);
     }
 };
@@ -218,14 +215,14 @@
                     typename geometry::tag<Geometry1>::type,
                     typename geometry::tag<Geometry2>::type,
                     typename geometry::tag<GeometryOut>::type,
- Geometry1, Geometry2, GeometryOut, strategy
+ Geometry1, Geometry2, GeometryOut
>,
             dispatch::intersection
             <
                     typename geometry::tag<Geometry1>::type,
                     typename geometry::tag<Geometry2>::type,
                     typename geometry::tag<GeometryOut>::type,
- Geometry1, Geometry2, GeometryOut, strategy
+ Geometry1, Geometry2, GeometryOut
>
>::type::apply(geometry1, geometry2, geometry_out, strategy());
 }


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