Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55301 - sandbox/fmhess/boost/generic_ptr
From: fmhess_at_[hidden]
Date: 2009-07-30 17:14:04


Author: fmhess
Date: 2009-07-30 16:28:52 EDT (Thu, 30 Jul 2009)
New Revision: 55301
URL: http://svn.boost.org/trac/boost/changeset/55301

Log:
Removed some asserts, which can be replaced by the user if they
choose by using "asserting" (or "throwing" or "nonnull").

Text files modified:
   sandbox/fmhess/boost/generic_ptr/cloning.hpp | 3 ---
   sandbox/fmhess/boost/generic_ptr/enable_shared_from_this.hpp | 2 +-
   sandbox/fmhess/boost/generic_ptr/intrusive.hpp | 3 ---
   sandbox/fmhess/boost/generic_ptr/shared.hpp | 3 ---
   4 files changed, 1 insertions(+), 10 deletions(-)

Modified: sandbox/fmhess/boost/generic_ptr/cloning.hpp
==============================================================================
--- sandbox/fmhess/boost/generic_ptr/cloning.hpp (original)
+++ sandbox/fmhess/boost/generic_ptr/cloning.hpp 2009-07-30 16:28:52 EDT (Thu, 30 Jul 2009)
@@ -14,7 +14,6 @@
 #ifndef BOOST_GENERIC_PTR_CLONING_HPP_INCLUDED
 #define BOOST_GENERIC_PTR_CLONING_HPP_INCLUDED
 
-#include <boost/assert.hpp>
 #include <boost/config.hpp>
 #include <boost/generic_ptr/detail/util.hpp>
 #include <boost/generic_ptr/pointer_cast.hpp>
@@ -313,13 +312,11 @@
 
       pointer operator->() const
       {
- BOOST_ASSERT(get_plain_old_pointer(px) != 0);
         return px;
       }
 
       reference operator*() const
       {
- BOOST_ASSERT(get_plain_old_pointer(px) != 0);
         return *px;
       }
 

Modified: sandbox/fmhess/boost/generic_ptr/enable_shared_from_this.hpp
==============================================================================
--- sandbox/fmhess/boost/generic_ptr/enable_shared_from_this.hpp (original)
+++ sandbox/fmhess/boost/generic_ptr/enable_shared_from_this.hpp 2009-07-30 16:28:52 EDT (Thu, 30 Jul 2009)
@@ -53,7 +53,7 @@
         BOOST_ASSERT( get_plain_old_pointer(p) == this );
         return p;
     }
-//FIXME: yikes! we need to make it easier to add/remove const from a generic pointer's value_type
+
     typename shared<T>::template rebind<typename shared<T>::value_type const>::other shared_from_this() const
     {
         typename shared<T>::template rebind<typename shared<T>::value_type const>::other p( weak_this_ );

Modified: sandbox/fmhess/boost/generic_ptr/intrusive.hpp
==============================================================================
--- sandbox/fmhess/boost/generic_ptr/intrusive.hpp (original)
+++ sandbox/fmhess/boost/generic_ptr/intrusive.hpp 2009-07-30 16:28:52 EDT (Thu, 30 Jul 2009)
@@ -21,7 +21,6 @@
 # pragma warning(disable:4284) // odd return type for operator->
 #endif
 
-#include <boost/assert.hpp>
 #include <boost/detail/workaround.hpp>
 #include <boost/generic_ptr/detail/util.hpp>
 #include <boost/generic_ptr/pointer_cast.hpp>
@@ -193,13 +192,11 @@
 
     reference operator*() const
     {
- BOOST_ASSERT( get_plain_old_pointer(px) != 0 );
         return *px;
     }
 
     pointer operator->() const
     {
- BOOST_ASSERT( get_plain_old_pointer(px) != 0 );
         return px;
     }
 

Modified: sandbox/fmhess/boost/generic_ptr/shared.hpp
==============================================================================
--- sandbox/fmhess/boost/generic_ptr/shared.hpp (original)
+++ sandbox/fmhess/boost/generic_ptr/shared.hpp 2009-07-30 16:28:52 EDT (Thu, 30 Jul 2009)
@@ -36,7 +36,6 @@
 // rather than including <memory> directly:
 #include <boost/config/no_tr1/memory.hpp> // std::auto_ptr
 
-#include <boost/assert.hpp>
 #include <boost/checked_delete.hpp>
 #include <boost/generic_ptr/detail/util.hpp>
 #include <boost/generic_ptr/pointer_cast.hpp>
@@ -393,13 +392,11 @@
 
     reference operator* () const // never throws
     {
- BOOST_ASSERT(get_plain_old_pointer(px));
         return *px;
     }
 
     pointer operator-> () const // never throws
     {
- BOOST_ASSERT(get_plain_old_pointer(px));
         return px;
     }
 


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