Handle GCC's -fno-exceptions properly. Fixes #1198

[SVN r39061]
This commit is contained in:
Douglas Gregor
2007-08-29 19:06:11 +00:00
parent e4f165a4e8
commit a7b9940f15

View File

@ -562,12 +562,16 @@ namespace boost {
operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
{ {
this->clear(); this->clear();
#ifndef BOOST_NO_EXCEPTIONS
try { try {
this->assign_to(f); this->assign_to(f);
} catch (...) { } catch (...) {
vtable = 0; vtable = 0;
throw; throw;
} }
#else
this->assign_to(f);
#endif
return *this; return *this;
} }
@ -593,12 +597,16 @@ namespace boost {
return *this; return *this;
this->clear(); this->clear();
#ifndef BOOST_NO_EXCEPTIONS
try { try {
this->assign_to_own(f); this->assign_to_own(f);
} catch (...) { } catch (...) {
vtable = 0; vtable = 0;
throw; throw;
} }
#else
this->assign_to_own(f);
#endif
return *this; return *this;
} }