diff --git a/include/boost/regex/pattern_except.hpp b/include/boost/regex/pattern_except.hpp index e3d202e0..7ca409d8 100644 --- a/include/boost/regex/pattern_except.hpp +++ b/include/boost/regex/pattern_except.hpp @@ -52,7 +52,7 @@ class BOOST_REGEX_DECL regex_error : public std::runtime_error public: explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0); explicit regex_error(regex_constants::error_type err); - ~regex_error() BOOST_NOEXCEPT; + ~regex_error() BOOST_NOEXCEPT_OR_NOTHROW; regex_constants::error_type code()const { return m_error_code; } std::ptrdiff_t position()const diff --git a/include/boost/regex/v4/perl_matcher.hpp b/include/boost/regex/v4/perl_matcher.hpp index 644e78ba..05886b08 100644 --- a/include/boost/regex/v4/perl_matcher.hpp +++ b/include/boost/regex/v4/perl_matcher.hpp @@ -27,6 +27,13 @@ #ifdef BOOST_MSVC # pragma warning(push) +#pragma warning(disable : 4251) +#if BOOST_MSVC < 1700 +# pragma warning(disable : 4231) +#endif +# if BOOST_MSVC < 1600 +# pragma warning(disable : 4660) +# endif #if BOOST_MSVC < 1910 #pragma warning(disable:4800) #endif @@ -362,17 +369,6 @@ struct recursion_info # pragma warning(pop) #endif -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable : 4251) -#if BOOST_MSVC < 1700 -# pragma warning(disable : 4231) -#endif -# if BOOST_MSVC < 1600 -# pragma warning(disable : 4660) -# endif -#endif - template class perl_matcher { @@ -601,13 +597,17 @@ private: } perl_matcher(const perl_matcher& that) : m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {} -}; #ifdef BOOST_MSVC # pragma warning(pop) #endif +}; } // namespace BOOST_REGEX_DETAIL_NS +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable: 4103) @@ -621,13 +621,6 @@ private: } // namespace boost -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - // // include the implementation of perl_matcher: // diff --git a/src/regex.cpp b/src/regex.cpp index 5cc43ae4..ee0204cc 100644 --- a/src/regex.cpp +++ b/src/regex.cpp @@ -72,7 +72,7 @@ regex_error::regex_error(regex_constants::error_type err) { } -regex_error::~regex_error() BOOST_NOEXCEPT +regex_error::~regex_error() BOOST_NOEXCEPT_OR_NOTHROW { }