From 53de752e1fc43d0726c7e7d1c0a21e76c01940e9 Mon Sep 17 00:00:00 2001 From: Romain Geissler Date: Tue, 13 Nov 2018 23:37:17 +0000 Subject: [PATCH 1/2] Use BOOST_NOEXCEPT_OR_NOTHROW in public headers to prepare for C++20 --- include/boost/numeric/conversion/converter_policies.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/boost/numeric/conversion/converter_policies.hpp b/include/boost/numeric/conversion/converter_policies.hpp index e7a5e67..1619d64 100644 --- a/include/boost/numeric/conversion/converter_policies.hpp +++ b/include/boost/numeric/conversion/converter_policies.hpp @@ -12,6 +12,7 @@ #include // for std::bad_cast +#include #include // for std::floor and std::ceil #include @@ -136,7 +137,7 @@ class bad_numeric_cast : public std::bad_cast { public: - virtual const char * what() const throw() + virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW { return "bad numeric conversion: overflow"; } }; @@ -144,14 +145,14 @@ class negative_overflow : public bad_numeric_cast { public: - virtual const char * what() const throw() + virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW { return "bad numeric conversion: negative overflow"; } }; class positive_overflow : public bad_numeric_cast { public: - virtual const char * what() const throw() + virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW { return "bad numeric conversion: positive overflow"; } }; From de922921408bc7116a3c7c67b2fcfbe3e3214f3b Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Sun, 31 Mar 2019 20:12:53 +0300 Subject: [PATCH 2/2] Tests: Fix C1128 error on msvc-14.1+ traits_test fails on msvc-14.1+ in 64bit debug mode with C1128 error Fixes #15 --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index d4fc25a..16f3eba 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -19,7 +19,7 @@ project numeric_conversion_unit_tests test-suite minimal : [ run bounds_test.cpp ] - [ run traits_test.cpp ] + [ run traits_test.cpp : : : msvc:/bigobj ] [ run converter_test.cpp ] [ run udt_support_test.cpp ] [ run numeric_cast_test.cpp ]