]> git.lyx.org Git - features.git/commitdiff
make it compile without exceptions on gcc 2.96
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 10 Jun 2002 18:08:12 +0000 (18:08 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 10 Jun 2002 18:08:12 +0000 (18:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4357 a592a061-630c-0410-9148-cb99ea01b6c8

boost/boost/config/user.hpp
boost/boost/detail/shared_count.hpp

index 507117f783d8bcbd70dc72410fd5cd45f98d89b9..6cada009789b3da20ad640dd5972df7e4b9ec137 100644 (file)
 // If there are no exceptions then we must report critical-errors
 // the only way we know how; by terminating.
 //
-#ifdef __BORLANDC__
+//#ifdef __BORLANDC__
 // <cstdio> seems not to make stderr usable with Borland:
-#include <stdio.h>
-#endif
+#include <cstdio>
+//#endif
 #  define BOOST_NOEH_ASSERT(x)\
 if(0 == (x))\
 {\
index b937ce0e11858469be56a9944721eb88f0c3010f..918d64745173bf53d4aa6ab4fcd6960792d1fee3 100644 (file)
@@ -233,18 +233,23 @@ public:
 
     template<class P, class D> shared_count(P p, D d, void const * = 0): pi_(0)
     {
+#ifndef BOOST_NO_EXCEPTIONS
         try
         {
+#endif
             pi_ = new counted_base_impl<P, D>(p, d, 1, 1);
+#ifndef BOOST_NO_EXCEPTIONS
         }
+#endif
+#ifndef BOOST_NO_EXCEPTIONS
         catch(...)
+                
         {
             d(p); // delete p
-#ifndef BOOST_NO_EXCEPTIONS
             throw;
-#endif
-            BOOST_NOEH_ASSERT(false);
         }
+#endif
+        BOOST_NOEH_ASSERT(pi_);
     }
 
     template<class P, class D> shared_count(P, D, counted_base * pi): pi_(pi)