From a7b9940f15a7aeef82f3a7f0912216e9d2839ea8 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 29 Aug 2007 19:06:11 +0000 Subject: [PATCH] Handle GCC's -fno-exceptions properly. Fixes #1198 [SVN r39061] --- include/boost/function/function_template.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 321bd13..5d7b2cf 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -562,12 +562,16 @@ namespace boost { operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f) { this->clear(); +#ifndef BOOST_NO_EXCEPTIONS try { this->assign_to(f); } catch (...) { vtable = 0; throw; } +#else + this->assign_to(f); +#endif return *this; } @@ -593,12 +597,16 @@ namespace boost { return *this; this->clear(); +#ifndef BOOST_NO_EXCEPTIONS try { this->assign_to_own(f); } catch (...) { vtable = 0; throw; } +#else + this->assign_to_own(f); +#endif return *this; }