diff options
Diffstat (limited to 'boost/regex')
-rw-r--r-- | boost/regex/icu.hpp | 4 | ||||
-rw-r--r-- | boost/regex/v4/basic_regex_parser.hpp | 2 | ||||
-rw-r--r-- | boost/regex/v4/match_results.hpp | 9 | ||||
-rw-r--r-- | boost/regex/v4/perl_matcher.hpp | 9 | ||||
-rw-r--r-- | boost/regex/v4/regex_format.hpp | 2 | ||||
-rw-r--r-- | boost/regex/v4/regex_workaround.hpp | 2 |
6 files changed, 14 insertions, 14 deletions
diff --git a/boost/regex/icu.hpp b/boost/regex/icu.hpp index 37fec2acc..572172e54 100644 --- a/boost/regex/icu.hpp +++ b/boost/regex/icu.hpp @@ -397,10 +397,10 @@ void copy_results(MR1& out, MR2 const& in) out.set_base(in.base().base()); for(int i = 0; i < (int)in.size(); ++i) { - if(in[i].matched) + if(in[i].matched || !i) { out.set_first(in[i].first.base(), i); - out.set_second(in[i].second.base(), i); + out.set_second(in[i].second.base(), i, in[i].matched); } } } diff --git a/boost/regex/v4/basic_regex_parser.hpp b/boost/regex/v4/basic_regex_parser.hpp index ca1adde3b..3c331a57c 100644 --- a/boost/regex/v4/basic_regex_parser.hpp +++ b/boost/regex/v4/basic_regex_parser.hpp @@ -1220,7 +1220,7 @@ bool basic_regex_parser<charT, traits>::parse_alt() ) ) { - fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression can start with the alternation operator |."); + fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression cannot start with the alternation operator |."); return false; } // diff --git a/boost/regex/v4/match_results.hpp b/boost/regex/v4/match_results.hpp index 63e511759..3e79b7a76 100644 --- a/boost/regex/v4/match_results.hpp +++ b/boost/regex/v4/match_results.hpp @@ -76,10 +76,15 @@ public: // construct/copy/destroy: explicit match_results(const Allocator& a = Allocator()) #ifndef BOOST_NO_STD_ALLOCATOR - : m_subs(a), m_base(), m_last_closed_paren(0), m_is_singular(true) {} + : m_subs(a), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) {} #else - : m_subs(), m_base(), m_last_closed_paren(0), m_is_singular(true) { (void)a; } + : m_subs(), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) { (void)a; } #endif + // + // IMPORTANT: in the code below, the crazy looking checks around m_is_singular are + // all required because it is illegal to copy a singular iterator. + // See https://svn.boost.org/trac/boost/ticket/3632. + // match_results(const match_results& m) : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular) { diff --git a/boost/regex/v4/perl_matcher.hpp b/boost/regex/v4/perl_matcher.hpp index 0a37a84a6..b7b3b58e6 100644 --- a/boost/regex/v4/perl_matcher.hpp +++ b/boost/regex/v4/perl_matcher.hpp @@ -254,13 +254,8 @@ class repeater_count std::size_t count; // the number of iterations so far BidiIterator start_pos; // where the last repeat started public: - repeater_count(repeater_count** s) - { - stack = s; - next = 0; - state_id = -1; - count = 0; - } + repeater_count(repeater_count** s) : stack(s), next(0), state_id(-1), count(0), start_pos() {} + repeater_count(int i, repeater_count** s, BidiIterator start) : start_pos(start) { diff --git a/boost/regex/v4/regex_format.hpp b/boost/regex/v4/regex_format.hpp index 80c654e40..a34c40ad2 100644 --- a/boost/regex/v4/regex_format.hpp +++ b/boost/regex/v4/regex_format.hpp @@ -96,7 +96,7 @@ class basic_regex_formatter public: typedef typename traits::char_type char_type; basic_regex_formatter(OutputIterator o, const Results& r, const traits& t) - : m_traits(t), m_results(r), m_out(o), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} + : m_traits(t), m_results(r), m_out(o), m_position(), m_end(), m_flags(), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f); OutputIterator format(ForwardIter p1, match_flag_type f) { diff --git a/boost/regex/v4/regex_workaround.hpp b/boost/regex/v4/regex_workaround.hpp index 46a8a8d3a..fc57472a3 100644 --- a/boost/regex/v4/regex_workaround.hpp +++ b/boost/regex/v4/regex_workaround.hpp @@ -71,7 +71,7 @@ using std::distance; /***************************************************************************** * - * Fix broken broken namespace support: + * Fix broken namespace support: * ****************************************************************************/ |