]> git.lyx.org Git - features.git/commitdiff
boost.diff
authorLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 22 Feb 2001 14:37:39 +0000 (14:37 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Thu, 22 Feb 2001 14:37:39 +0000 (14:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1601 a592a061-630c-0410-9148-cb99ea01b6c8

boost/boost/smart_ptr.hpp

index 0f6d559d599059aae7e52e3867622cff87e191bc..6b03d49f3550c249e5b2c7afc3270b85897d2ad0 100644 (file)
 #include <boost/utility.hpp>  // for boost::noncopyable
 #include <functional>         // for std::less
 
+#ifdef LYX_NO_EXCEPTIONS
+#include <assert.h>
+#endif
+
 namespace boost {
 
 //  scoped_ptr  --------------------------------------------------------------//
@@ -142,6 +146,7 @@ template<typename T> class shared_ptr {
       catch (...) { delete p; throw; } 
 #else
          pn = new long(1);
+         assert(pn != 0);
 #endif
    }
 
@@ -221,6 +226,7 @@ template<typename T> class shared_ptr {
         } // catch
 #else
                pn = new long;
+               assert(pn != 0);
 #endif
       } // allocate new reference counter
       *pn = 1;
@@ -298,6 +304,7 @@ template<typename T> class shared_array {
       catch (...) { delete [] p; throw; } 
 #else
          pn = new long(1);
+         assert(pn != 0);
 #endif
    }
 
@@ -328,6 +335,7 @@ template<typename T> class shared_array {
         } // catch
 #else
                pn = new long;
+               assert(pn != 0);
 #endif
       } // allocate new reference counter
       *pn = 1;