[Boost-bugs] [Boost C++ Libraries] #8686: Not compilable with exceptions disabled

Subject: [Boost-bugs] [Boost C++ Libraries] #8686: Not compilable with exceptions disabled
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-11 11:25:52


#8686: Not compilable with exceptions disabled
-------------------------------------------------+---------------------
 Reporter: Norbert Riedlin <norbert.riedlin@…> | Owner: chenry
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: msm
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
-------------------------------------------------+---------------------
 With disabled exceptions the code in do_process_helper() won't compile
 under gcc (Used version was llvm-gcc-4.2 under MacOSX 10.7.5)
 In the function template:
 {{{
 template <class StateType,class EventType>
 HandledEnum do_process_helper(EventType const& evt, ::boost::mpl::false_
 const &, bool is_direct_call)
 try
 {
     return this->do_process_event(evt,is_direct_call);
 }
 catch (std::exception& e)
 {
     // give a chance to the concrete state machine to handle
     this->exception_caught(evt,*this,e);
 }
 //...
 }
 }}}

 gcc will somehow forget about the formal parameter {{{e}}} in the catch
 clause but still insists on the code in the {{{catch}}} clause to be
 compilable. Apart from replacing {{{try}}} and {{{catch}}} by the boost
 macros {{{BOOST_TRY}}} etc. I also had to declare a local variable
 {{{std::exception e}}} that won't be used in any way apart from making the
 code compilable in the case without exceptions. See the attached patch
 file.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8686>
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:50:13 UTC