diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-26 08:15:55 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-26 08:15:55 -0400 |
commit | bb4dd8289b351fae6b55e303f189127a394a1edd (patch) | |
tree | 77c9c35a31b1459dd7988c2448e797d142530c41 /boost/numeric | |
parent | 1a78a62555be32868418fe52f8e330c9d0f95d5a (diff) | |
download | boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.gz boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.bz2 boost-bb4dd8289b351fae6b55e303f189127a394a1edd.zip |
Imported Upstream version 1.51.0upstream/1.51.0
Diffstat (limited to 'boost/numeric')
-rw-r--r-- | boost/numeric/conversion/converter_policies.hpp | 8 | ||||
-rw-r--r-- | boost/numeric/interval/detail/msvc_rounding_control.hpp | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/boost/numeric/conversion/converter_policies.hpp b/boost/numeric/conversion/converter_policies.hpp index b0d741b8e3..e7a5e67ce9 100644 --- a/boost/numeric/conversion/converter_policies.hpp +++ b/boost/numeric/conversion/converter_policies.hpp @@ -13,6 +13,7 @@ #include <typeinfo> // for std::bad_cast #include <boost/config/no_tr1/cmath.hpp> // for std::floor and std::ceil +#include <boost/throw_exception.hpp> #include <functional> @@ -158,10 +159,17 @@ struct def_overflow_handler { void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow) { +#ifndef BOOST_NO_EXCEPTIONS if ( r == cNegOverflow ) throw negative_overflow() ; else if ( r == cPosOverflow ) throw positive_overflow() ; +#else + if ( r == cNegOverflow ) + ::boost::throw_exception(negative_overflow()) ; + else if ( r == cPosOverflow ) + ::boost::throw_exception(positive_overflow()) ; +#endif } } ; diff --git a/boost/numeric/interval/detail/msvc_rounding_control.hpp b/boost/numeric/interval/detail/msvc_rounding_control.hpp index 95c790fe72..d36e802429 100644 --- a/boost/numeric/interval/detail/msvc_rounding_control.hpp +++ b/boost/numeric/interval/detail/msvc_rounding_control.hpp @@ -25,7 +25,7 @@ namespace numeric { namespace interval_lib { namespace detail { -#if BOOST_MSVC < 1400 || defined(WIN64) +#if BOOST_MSVC < 1400 || defined(_WIN64) extern "C" { double rint(double); } #else inline double rint(double x) |