Skip to content

Commit f64c228

Browse files
committed
Fix exception specification and msvc warning push/pop.
1 parent 2cd947f commit f64c228

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

include/boost/regex/pattern_except.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class BOOST_REGEX_DECL regex_error : public std::runtime_error
5252
public:
5353
explicit regex_error(const std::string& s, regex_constants::error_type err = regex_constants::error_unknown, std::ptrdiff_t pos = 0);
5454
explicit regex_error(regex_constants::error_type err);
55-
~regex_error() BOOST_NOEXCEPT;
55+
~regex_error() BOOST_NOEXCEPT_OR_NOTHROW;
5656
regex_constants::error_type code()const
5757
{ return m_error_code; }
5858
std::ptrdiff_t position()const

include/boost/regex/v4/perl_matcher.hpp

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727

2828
#ifdef BOOST_MSVC
2929
# pragma warning(push)
30+
#pragma warning(disable : 4251)
31+
#if BOOST_MSVC < 1700
32+
# pragma warning(disable : 4231)
33+
#endif
34+
# if BOOST_MSVC < 1600
35+
# pragma warning(disable : 4660)
36+
# endif
3037
#if BOOST_MSVC < 1910
3138
#pragma warning(disable:4800)
3239
#endif
@@ -362,17 +369,6 @@ struct recursion_info
362369
# pragma warning(pop)
363370
#endif
364371

365-
#ifdef BOOST_MSVC
366-
#pragma warning(push)
367-
#pragma warning(disable : 4251)
368-
#if BOOST_MSVC < 1700
369-
# pragma warning(disable : 4231)
370-
#endif
371-
# if BOOST_MSVC < 1600
372-
# pragma warning(disable : 4660)
373-
# endif
374-
#endif
375-
376372
template <class BidiIterator, class Allocator, class traits>
377373
class perl_matcher
378374
{
@@ -601,13 +597,17 @@ class perl_matcher
601597
}
602598
perl_matcher(const perl_matcher& that)
603599
: m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {}
604-
};
605600
#ifdef BOOST_MSVC
606601
# pragma warning(pop)
607602
#endif
603+
};
608604

609605
} // namespace BOOST_REGEX_DETAIL_NS
610606

607+
#ifdef BOOST_MSVC
608+
# pragma warning(pop)
609+
#endif
610+
611611
#ifdef BOOST_MSVC
612612
#pragma warning(push)
613613
#pragma warning(disable: 4103)
@@ -621,13 +621,6 @@ class perl_matcher
621621

622622
} // namespace boost
623623

624-
#ifdef BOOST_MSVC
625-
# pragma warning(pop)
626-
#endif
627-
#ifdef BOOST_MSVC
628-
# pragma warning(pop)
629-
#endif
630-
631624
//
632625
// include the implementation of perl_matcher:
633626
//

src/regex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ regex_error::regex_error(regex_constants::error_type err)
7272
{
7373
}
7474

75-
regex_error::~regex_error() BOOST_NOEXCEPT
75+
regex_error::~regex_error() BOOST_NOEXCEPT_OR_NOTHROW
7676
{
7777
}
7878

0 commit comments

Comments
 (0)