Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75797 - in trunk: boost/geometry/algorithms libs/geometry/doc/src/docutils/tools/support_status
From: bruno.lalande_at_[hidden]
Date: 2011-12-03 21:28:08


Author: bruno.lalande
Date: 2011-12-03 21:28:07 EST (Sat, 03 Dec 2011)
New Revision: 75797
URL: http://svn.boost.org/trac/boost/changeset/75797

Log:
Moved the static assertion to not_implemented.
Text files modified:
   trunk/boost/geometry/algorithms/distance.hpp | 15 ++-------------
   trunk/boost/geometry/algorithms/not_implemented.hpp | 14 +++++++++++++-
   trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp | 4 ++--
   3 files changed, 17 insertions(+), 16 deletions(-)

Modified: trunk/boost/geometry/algorithms/distance.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/distance.hpp (original)
+++ trunk/boost/geometry/algorithms/distance.hpp 2011-12-03 21:28:07 EST (Sat, 03 Dec 2011)
@@ -19,10 +19,6 @@
 #include <boost/range.hpp>
 #include <boost/typeof/typeof.hpp>
 
-#include <boost/static_assert.hpp>
-
-#include <boost/mpl/assert.hpp>
-
 #include <boost/geometry/core/cs.hpp>
 #include <boost/geometry/core/closure.hpp>
 #include <boost/geometry/core/reverse_dispatch.hpp>
@@ -255,15 +251,8 @@
     typename Geometry1, typename Geometry2,
     typename StrategyTag, typename Strategy
>
-struct distance: boost::geometry::not_implemented
-{
- BOOST_MPL_ASSERT_MSG
- (
- BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD,
- NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
- , (types<Geometry1, Geometry2>)
- );
-};
+struct distance: not_implemented<Geometry1, Geometry2>
+{};
 
 
 template <typename P1, typename P2, typename Strategy>

Modified: trunk/boost/geometry/algorithms/not_implemented.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/not_implemented.hpp (original)
+++ trunk/boost/geometry/algorithms/not_implemented.hpp 2011-12-03 21:28:07 EST (Sat, 03 Dec 2011)
@@ -16,6 +16,9 @@
 #define BOOST_GEOMETRY_ALGORITHMS_NOT_IMPLEMENTED_HPP
 
 
+#include <boost/mpl/assert.hpp>
+
+
 namespace boost { namespace geometry
 {
 
@@ -25,7 +28,16 @@
 #endif
 
 
-struct not_implemented {};
+template <typename Geometry1, typename Geometry2>
+struct not_implemented
+{
+ BOOST_MPL_ASSERT_MSG
+ (
+ BOOST_GEOMETRY_IMPLEMENTATION_STATUS_BUILD,
+ NOT_OR_NOT_YET_IMPLEMENTED_FOR_THIS_GEOMETRY_TYPE
+ , (types<Geometry1, Geometry2>)
+ );
+};
 
 
 }} // namespace boost::geometry

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-03 21:28:07 EST (Sat, 03 Dec 2011)
@@ -57,8 +57,8 @@
         typedef typename boost::geometry::tag<T1>::type tag1;
         typedef typename boost::geometry::tag<T2>::type tag2;
 
- if (boost::is_base_of<boost::geometry::not_implemented, check<tag1, tag2, T1, T2> >::type::value
- && boost::is_base_of<boost::geometry::not_implemented, check<tag2, tag1, T2, T1> >::type::value)
+ if (boost::is_base_of<boost::geometry::not_implemented<T1, T2>, check<tag1, tag2, T1, T2> >::type::value
+ && boost::is_base_of<boost::geometry::not_implemented<T2, T1>, check<tag2, tag1, T2, T1> >::type::value)
         {
             std::cout << "-\t";
         }


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