make it compile without exceptions on gcc 2.96

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4357 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-06-10 18:08:12 +00:00
parent 3dbc80c145
commit 1f91982766
2 changed files with 11 additions and 6 deletions

View File

@ -75,10 +75,10 @@
// 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))\
{\

View 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)