Boost C++ Libraries: Ticket #9096: local_time.hpp won't compile with BOOST_NO_EXCEPTIONS https://svn.boost.org/trac10/ticket/9096 <p> 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: </p> <pre class="wiki">#include &lt;boost/date_time/local_time/local_time.hpp&gt; </pre><p> The error is: </p> <pre class="wiki">/usr/include/boost/numeric/conversion/converter_policies.hpp:162: error: exception handling disabled, use -fexceptions to enable </pre><p> And the offending code in converter_policies.hpp is: </p> <pre class="wiki">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() ; } } ; </pre><p> According to <a class="ext-link" href="http://boost.2283326.n4.nabble.com/no-exceptions-td3395091.html"><span class="icon">​</span>http://boost.2283326.n4.nabble.com/no-exceptions-td3395091.html</a>, 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9096 Trac 1.4.3 Marshall Clow Tue, 10 Sep 2013 13:05:18 GMT owner, component changed https://svn.boost.org/trac10/ticket/9096#comment:1 https://svn.boost.org/trac10/ticket/9096#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Douglas Gregor</span> to <span class="trac-author">az_sw_dude</span> </li> <li><strong>component</strong> <span class="trac-field-old">numeric</span> → <span class="trac-field-new">date_time</span> </li> </ul> Ticket Marshall Clow Tue, 08 Oct 2013 17:41:55 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/9096#comment:2 https://svn.boost.org/trac10/ticket/9096#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This appears to have been fixed in <a class="changeset" href="https://svn.boost.org/trac10/changeset/77234" title="Fixes #5731, fixes #5076, fixes #5393, fixes #5800 Now numeric_cast ...">[77234]</a> back in March of this year, and merged to the release branch in <a class="changeset" href="https://svn.boost.org/trac10/changeset/77288" title="Merge from trunk * Much more tests * Now numeric_cast (and ...">[77288]</a> </p> <p> I believe that this change was part of 1.54.0. </p> Ticket