[Boost-bugs] [Boost C++ Libraries] #9096: local_time.hpp won't compile with BOOST_NO_EXCEPTIONS

Subject: [Boost-bugs] [Boost C++ Libraries] #9096: local_time.hpp won't compile with BOOST_NO_EXCEPTIONS
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-10 06:38:31


#9096: local_time.hpp won't compile with BOOST_NO_EXCEPTIONS
------------------------------------------+-------------------------
 Reporter: Alex Henrie <alexhenrie24@…> | Owner: dgregor
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: numeric
  Version: Boost 1.49.0 | Severity: Showstopper
 Keywords: |
------------------------------------------+-------------------------
 I have a project that is compiled with -fno-exceptions and
 -DBOOST_NO_EXCEPTIONS, but I get a compilation error when I try to use
 Boost's date/time library. To reproduce the error, just say:

 {{{
 #include <boost/date_time/local_time/local_time.hpp>
 }}}

 The error is:

 {{{
 /usr/include/boost/numeric/conversion/converter_policies.hpp:162: error:
 exception handling disabled, use -fexceptions to enable
 }}}

 And the offending code in converter_policies.hpp is:

 {{{
 struct def_overflow_handler
 {
   void operator() ( range_check_result r ) //
 throw(negative_overflow,positive_overflow)
   {
     if ( r == cNegOverflow )
       throw negative_overflow() ;
     else if ( r == cPosOverflow )
            throw positive_overflow() ;
   }
 } ;
 }}}

 According to http://boost.2283326.n4.nabble.com/no-exceptions-
 td3395091.html, BOOST_NO_EXCEPTIONS is actively supported and exceptions
 are always supposed to go through BOOST_THROW_EXCEPTION or
 boost::throw_exception to avoid compilation errors like this one.

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