Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80969 - in trunk/boost/geometry: algorithms multi/algorithms
From: bruno.lalande_at_[hidden]
Date: 2012-10-12 17:36:01


Author: bruno.lalande
Date: 2012-10-12 17:36:00 EDT (Fri, 12 Oct 2012)
New Revision: 80969
URL: http://svn.boost.org/trac/boost/changeset/80969

Log:
Defaulted Tag template parameter in dispatch::num_geometries.
Text files modified:
   trunk/boost/geometry/algorithms/num_geometries.hpp | 24 ++++++++++++------------
   trunk/boost/geometry/multi/algorithms/num_geometries.hpp | 2 +-
   2 files changed, 13 insertions(+), 13 deletions(-)

Modified: trunk/boost/geometry/algorithms/num_geometries.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/num_geometries.hpp (original)
+++ trunk/boost/geometry/algorithms/num_geometries.hpp 2012-10-12 17:36:00 EDT (Fri, 12 Oct 2012)
@@ -35,7 +35,16 @@
 {
 
 
-template <typename Tag, typename Geometry>
+template
+<
+ typename Geometry,
+ typename Tag = typename tag_cast
+ <
+ typename tag<Geometry>::type,
+ single_tag,
+ multi_tag
+ >::type
+>
 struct num_geometries
 {
     BOOST_MPL_ASSERT_MSG
@@ -47,7 +56,7 @@
 
 
 template <typename Geometry>
-struct num_geometries<single_tag, Geometry>
+struct num_geometries<Geometry, single_tag>
 {
     static inline std::size_t apply(Geometry const&)
     {
@@ -76,16 +85,7 @@
 {
     concept::check<Geometry const>();
 
- return dispatch::num_geometries
- <
- typename tag_cast
- <
- typename tag<Geometry>::type,
- single_tag,
- multi_tag
- >::type,
- Geometry
- >::apply(geometry);
+ return dispatch::num_geometries<Geometry>::apply(geometry);
 }
 
 

Modified: trunk/boost/geometry/multi/algorithms/num_geometries.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/num_geometries.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/num_geometries.hpp 2012-10-12 17:36:00 EDT (Fri, 12 Oct 2012)
@@ -32,7 +32,7 @@
 {
 
 template <typename MultiGeometry>
-struct num_geometries<multi_tag, MultiGeometry>
+struct num_geometries<MultiGeometry, multi_tag>
 {
     static inline std::size_t apply(MultiGeometry const& multi_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