sync PR 162 and PR 163 to v4

This commit is contained in:
zhangyiru committed 2021-10-15 10:36:47 -04:00
1 parent 75600e3519
commit 13ba033116
3 files changed
+12 -3

No files matched your search

+3 -2
View File
@@ -88,7 +88,8 @@ typedef regex_error bad_expression;
namespace BOOST_REGEX_DETAIL_NS{
inline void BOOST_REGEX_CALL raise_runtime_error(const std::runtime_error& ex)
template <class E>
inline void raise_runtime_error(const E& ex)
{
#ifndef BOOST_REGEX_STANDALONE
::boost::throw_exception(ex);
@@ -101,7 +102,7 @@ template <class traits>
void raise_error(const traits& t, regex_constants::error_type code)
{
(void)t; // warning suppression
std::runtime_error e(t.error_string(code));
regex_error e(t.error_string(code), code, 0);
::boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(e);
}