[Boost-bugs] [Boost C++ Libraries] #1198: patch: boost/function/function_template.hpp fails to compile with gcc -fno-exceptions

Subject: [Boost-bugs] [Boost C++ Libraries] #1198: patch: boost/function/function_template.hpp fails to compile with gcc -fno-exceptions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-22 14:42:38


#1198: patch: boost/function/function_template.hpp fails to compile with gcc -fno-
exceptions
-------------------------------+--------------------------------------------
 Reporter: andyc_at_[hidden] | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.34.1
 Severity: Problem | Keywords:
-------------------------------+--------------------------------------------
 .... despite the fact that I've got BOOST_NO_EXCEPTIONS defined. Here's
 the error message:

 {{{
 .../boost/function/function_template.hpp:597: error: exception handling
 disabled, use -fexceptions to enable
 }}}

 The following patch fixes it but I'm not sure the #else part is correct:


 {{{
 ===== boost/function/function_template.hpp 1.1 vs edited =====
 --- 1.1/boost/function/function_template.hpp 2007-08-17 11:57:51 +01:00
 +++ edited/boost/function/function_template.hpp 2007-08-22 13:55:32 +01:00
 @@ -592,12 +592,16 @@
          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;
      }


 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1198>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC