forked from boostorg/regex
sync PR 162 and PR 163 to v4
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user