diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 75bf2a63..bae673f0 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -60,9 +60,9 @@ if ! $(disable-icu) lib icuin : : icui18n shared shared @path_options ; lib icuin : : msvc debug icuind shared shared @path_options ; - lib icuin : : msvc release icuin shared shared @path_options ; + lib icuin : : msvc icuin shared shared @path_options ; lib icuin : : intel windows debug icuind shared shared @path_options ; - lib icuin : : intel windows release icuin shared shared @path_options ; + lib icuin : : intel windows icuin shared shared @path_options ; lib icuin : : this_is_an_invalid_library_name ; if $(ICU_PATH) @@ -103,12 +103,13 @@ if ! $(disable-icu) icuin/shared/shared BOOST_HAS_ICU=1 shared - msvc:/delayload:$(icuucd_name:B).dll - msvc:/delayload:$(icuuc_name:B).dll - msvc:/delayload:$(icudt_name:B).dll - msvc:/delayload:$(icuin_name:B).dll - msvc:/delayload:$(icuind_name:B).dll - msvc:delayimp.lib + # As of ICU-54 this does not work anymore (release mode): + #msvc:/delayload:$(icuucd_name:B).dll + #msvc:/delayload:$(icuuc_name:B).dll + #msvc:/delayload:$(icudt_name:B).dll + #msvc:/delayload:$(icuin_name:B).dll + #msvc:/delayload:$(icuind_name:B).dll + #msvc:delayimp.lib ; } diff --git a/doc/history.qbk b/doc/history.qbk index d190debb..aebaee81 100644 --- a/doc/history.qbk +++ b/doc/history.qbk @@ -25,7 +25,7 @@ this gets bumped up from v4 to v5. * Fixed documentation typos from [@https://svn.boost.org/trac/boost/ticket/9283 #9283]. * Fixed bug in collation code that failed if the locale generated collation strings with embedded nul's, see [@https://svn.boost.org/trac/boost/ticket/9451 #9451]. -* Apply patch for unusual thread usage (no statically initiallized mutexes), see [@https://svn.boost.org/trac/boost/ticket/9461 #9461]. +* Apply patch for unusual thread usage (no statically initialized mutexes), see [@https://svn.boost.org/trac/boost/ticket/9461 #9461]. * Added better checks for invalid UTF-8 sequences, see [@https://svn.boost.org/trac/boost/ticket/9473 #9473]. [h4 Boost-1.54] @@ -153,7 +153,7 @@ and * Breaking Change: POSIX-extended and POSIX-basic regular expressions now enforce the letter of the POSIX standard much more closely than before. * Added support for (?imsx-imsx) constructs. * Added support for lookbehind expressions (?<=positive-lookbehind) and (?& v, std::string& s, boost::match_flag_type flags = match_default, unsigned max_count = ~0);`] [Splits the input string and pushes each one onto the vector. diff --git a/doc/regex_split.qbk b/doc/regex_split.qbk index d05e7f05..75543952 100644 --- a/doc/regex_split.qbk +++ b/doc/regex_split.qbk @@ -87,7 +87,7 @@ from a html file, and print them out to cout: char c; while(is.get(c)) { - // use logarithmic growth stategy, in case + // use logarithmic growth strategy, in case // in_avail (above) returned zero: if(s.capacity() == s.size()) s.reserve(s.capacity() * 3); diff --git a/doc/syntax_basic.qbk b/doc/syntax_basic.qbk index 019d731a..c3741934 100644 --- a/doc/syntax_basic.qbk +++ b/doc/syntax_basic.qbk @@ -156,7 +156,7 @@ An expression of the form `[[.col.]` matches the collating element /col/. A collating element is any single character, or any sequence of characters that collates as a single unit. Collating elements may also be used as the end point of a range, for example: `[[.ae.]-c]` matches -the character sequence "ae", plus any single character in the rangle "ae"-c, +the character sequence "ae", plus any single character in the range "ae"-c, assuming that "ae" is treated as a single collating element in the current locale. Collating elements may be used in place of escapes (which are not diff --git a/include/boost/regex/icu.hpp b/include/boost/regex/icu.hpp index 37fec2ac..572172e5 100644 --- a/include/boost/regex/icu.hpp +++ b/include/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/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index ca1adde3..3c331a57 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -1220,7 +1220,7 @@ bool basic_regex_parser::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/include/boost/regex/v4/match_results.hpp b/include/boost/regex/v4/match_results.hpp index 63e51175..3e79b7a7 100644 --- a/include/boost/regex/v4/match_results.hpp +++ b/include/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/include/boost/regex/v4/perl_matcher.hpp b/include/boost/regex/v4/perl_matcher.hpp index 0a37a84a..b7b3b58e 100644 --- a/include/boost/regex/v4/perl_matcher.hpp +++ b/include/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/include/boost/regex/v4/regex_format.hpp b/include/boost/regex/v4/regex_format.hpp index 80c654e4..a34c40ad 100644 --- a/include/boost/regex/v4/regex_format.hpp +++ b/include/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/include/boost/regex/v4/regex_workaround.hpp b/include/boost/regex/v4/regex_workaround.hpp index 46a8a8d3..fc57472a 100644 --- a/include/boost/regex/v4/regex_workaround.hpp +++ b/include/boost/regex/v4/regex_workaround.hpp @@ -71,7 +71,7 @@ using std::distance; /***************************************************************************** * - * Fix broken broken namespace support: + * Fix broken namespace support: * ****************************************************************************/ diff --git a/src/fileiter.cpp b/src/fileiter.cpp index 780a12f1..5f65127f 100644 --- a/src/fileiter.cpp +++ b/src/fileiter.cpp @@ -267,14 +267,15 @@ void mapfile::lock(pointer* node)const read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile); else read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile); -#ifndef BOOST_NO_EXCEPTIONS if((read_size == 0) || (std::ferror(hfile))) { +#ifndef BOOST_NO_EXCEPTIONS + unlock(node); throw std::runtime_error("Unable to read file."); - } #else - BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0)); + BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0)); #endif + } } else {