dont throw, assert or ponder on instead

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4184 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-05-22 06:29:42 +00:00
parent 482c04ecca
commit c7bc2da4a2
4 changed files with 103 additions and 87 deletions

View File

@ -1,5 +1,8 @@
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
* boost/detail/shared_count.hpp: never throw, assert or ponder on
instead.
* major boost update. (a bit more is comming)
2001-09-07 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>

View File

@ -26,11 +26,14 @@
#include <boost/detail/lightweight_mutex.hpp>
#include <functional> // for std::less
#if 0
#include <exception> // for std::exception
#endif
namespace boost
{
#if 0
class use_count_is_zero: public std::exception
{
public:
@ -40,6 +43,7 @@ public:
return "use_count_is_zero";
}
};
#endif
class counted_base
{
@ -83,7 +87,11 @@ public:
#ifdef BOOST_HAS_THREADS
mutex_type::scoped_lock lock(mtx_);
#endif
#if 0
if(use_count_ == 0 && weak_count_ != 0) throw use_count_is_zero();
#else
if(use_count_ == 0 && weak_count_ != 0) assert(false);
#endif
++use_count_;
++weak_count_;
}
@ -230,15 +238,19 @@ public:
template<class P, class D> shared_count(P p, D d, void const * = 0): pi_(0)
{
#if 0
try
{
#endif
pi_ = new counted_base_impl<P, D>(p, d, 1, 1);
#if 0
}
catch(...)
{
d(p); // delete p
throw;
}
#endif
}
template<class P, class D> shared_count(P, D, counted_base * pi): pi_(pi)

View File

@ -1,6 +1,7 @@
2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyxinclude.m4 (lyx_warning): add entry for gcc 3.1
(lyx_warning): disable exceptions for gcc 3.1 too
* kde.m4: remove file

View File

@ -211,7 +211,7 @@ if test x$GXX = xyes; then
2.95.*) CXXFLAGS="$lyx_opt -fno-exceptions";;
2.96*) CXXFLAGS="$lyx_opt -fno-exceptions";;
3.0*) CXXFLAGS="$lyx_opt -fno-rtti -fno-exceptions";;
3.1*) CXXFLAGS="$lyx_opt";;
3.1*) CXXFLAGS="$lyx_opt -fno-rtti -fno-exceptions";;
*2.91.*) CXXFLAGS="$lyx_opt -fno-rtti -fno-exceptions";;
*) CXXFLAGS="$lyx_opt -fno-rtti -fno-exceptions";;
esac