mirror of
https://github.com/boostorg/regex.git
synced 2025-07-18 23:02:09 +02:00
Tighten up error handling and checking.
[SVN r57133]
This commit is contained in:
@ -141,6 +141,11 @@ void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2,
|
||||
case regbase::literal:
|
||||
m_parser_proc = &basic_regex_parser<charT, traits>::parse_literal;
|
||||
break;
|
||||
default:
|
||||
// Ooops, someone has managed to set more than one of the main option flags,
|
||||
// so this must be an error:
|
||||
fail(regex_constants::error_unknown, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// parse all our characters:
|
||||
|
@ -411,6 +411,7 @@ public:
|
||||
}
|
||||
void BOOST_REGEX_CALL set_first(BidiIterator i)
|
||||
{
|
||||
BOOST_ASSERT(m_subs.size() > 2);
|
||||
// set up prefix:
|
||||
m_subs[1].second = i;
|
||||
m_subs[1].matched = (m_subs[1].first != i);
|
||||
|
Reference in New Issue
Block a user