[boost] Use boost::throw_exception in boost/numeric/conversion
Petr Machata
pmachata at fedoraproject.org
Fri Jul 22 09:54:53 UTC 2011
commit 0d81224cf6bac87e20e33608edb2123a95b4301c
Author: Petr Machata <pmachata at gmail.com>
Date: Fri Jul 22 11:54:22 2011 +0200
Use boost::throw_exception in boost/numeric/conversion
- this to allow compilation with -fno-exception
boost-1.47.0-exceptions.patch | 25 +++++++++++++++++++++++++
boost.spec | 10 +++++++++-
2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/boost-1.47.0-exceptions.patch b/boost-1.47.0-exceptions.patch
new file mode 100644
index 0000000..9faa715
--- /dev/null
+++ b/boost-1.47.0-exceptions.patch
@@ -0,0 +1,25 @@
+diff -up boost/numeric/conversion/converter_policies.hpp\~ boost/numeric/conversion/converter_policies.hpp
+--- boost/numeric/conversion/converter_policies.hpp~ 2008-10-13 11:00:03.000000000 +0200
++++ boost/numeric/conversion/converter_policies.hpp 2011-07-22 11:46:40.961876274 +0200
+@@ -20,6 +20,7 @@
+
+ #include "boost/mpl/if.hpp"
+ #include "boost/mpl/integral_c.hpp"
++#include "boost/throw_exception.hpp"
+
+ namespace boost { namespace numeric
+ {
+@@ -159,9 +160,9 @@ struct def_overflow_handler
+ void operator() ( range_check_result r ) // throw(negative_overflow,positive_overflow)
+ {
+ if ( r == cNegOverflow )
+- throw negative_overflow() ;
++ boost::throw_exception( negative_overflow() ) ;
+ else if ( r == cPosOverflow )
+- throw positive_overflow() ;
++ boost::throw_exception( positive_overflow() ) ;
+ }
+ } ;
+
+
+Diff finished. Fri Jul 22 11:46:49 2011
diff --git a/boost.spec b/boost.spec
index 9442b9e..daea589 100644
--- a/boost.spec
+++ b/boost.spec
@@ -27,7 +27,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.47.0
%define version_enc 1_47_0
-Release: 1%{?dist}
+Release: 2%{?dist}
License: Boost
# The CMake build framework (set of CMakeLists.txt and module.cmake files) is
@@ -91,6 +91,8 @@ Patch1: boost-cmake-soname.patch
# it upstream: https://svn.boost.org/trac/boost/ticket/4999
Patch2: boost-1.47.0-signals-erase.patch
+Patch3: boost-1.47.0-exceptions.patch
+
%bcond_with tests
%bcond_with docs_generated
@@ -423,6 +425,7 @@ sed 's/_FEDORA_SONAME/%{sonamever}/' %{PATCH1} | %{__patch} -p0 --fuzz=0
# Fixes
%patch2 -p1
+%patch3 -p0
%build
# Support for building tests.
@@ -855,6 +858,11 @@ find $RPM_BUILD_ROOT%{_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec %{_
%{_bindir}/bjam
%changelog
+* Fri Jul 22 2011 Petr Machata <pmachata at redhat.com> - 1.47.0-2
+- Convert two throws in boost/numeric/conversion to
+ boost::throw_exception to allow compilation with -fno-exception
+- Resolves: #724015
+
* Thu Jul 14 2011 Denis Arnaud <denis.arnaud_fedora at m4x.org> - 1.47.0-1
- Upgrade to Boost-1.47.0, adding three new header-only components
(Geometry, Phoenix, Ratio) and a new library (Chrono).
More information about the scm-commits
mailing list