diff options
Diffstat (limited to '3rdParty/Boost/src/boost/regex/v4')
11 files changed, 135 insertions, 72 deletions
diff --git a/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp b/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp index 04c7bb3..0b63e3a 100644 --- a/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp @@ -1,7 +1,7 @@ /* * - * Copyright (c) 1998-2004 - * John Maddock + * Copyright (c) 1998-2004 John Maddock + * Copyright 2011 Garmin Ltd. or its subsidiaries * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at @@ -36,7 +36,10 @@ namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) -#pragma warning(disable : 4251 4231 4660 4800) +#pragma warning(disable : 4251 4231 4800) +#if BOOST_MSVC < 1600 +#pragma warning(disable : 4660) +#endif #endif namespace re_detail{ @@ -234,7 +237,7 @@ public: std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const { if(n == 0) - throw std::out_of_range("0 is not a valid subexpression index."); + boost::throw_exception(std::out_of_range("0 is not a valid subexpression index.")); const std::pair<std::size_t, std::size_t>& pi = this->m_subs.at(n - 1); std::pair<const_iterator, const_iterator> p(expression() + pi.first, expression() + pi.second); return p; @@ -243,11 +246,11 @@ public: // begin, end: const_iterator BOOST_REGEX_CALL begin()const { - return (!this->m_status ? 0 : this->m_expression); + return (this->m_status ? 0 : this->m_expression); } const_iterator BOOST_REGEX_CALL end()const { - return (!this->m_status ? 0 : this->m_expression + this->m_expression_len); + return (this->m_status ? 0 : this->m_expression + this->m_expression_len); } flag_type BOOST_REGEX_CALL flags()const { @@ -398,7 +401,7 @@ public: typedef typename traits::string_type seq_type; seq_type a(arg_first, arg_last); if(a.size()) - assign(&*a.begin(), &*a.begin() + a.size(), f); + assign(static_cast<const charT*>(&*a.begin()), static_cast<const charT*>(&*a.begin() + a.size()), f); else assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f); } @@ -487,7 +490,7 @@ public: std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const { if(!m_pimpl.get()) - throw std::logic_error("Can't access subexpressions in an invalid regex."); + boost::throw_exception(std::logic_error("Can't access subexpressions in an invalid regex.")); return m_pimpl->subexpression(n); } const_iterator BOOST_REGEX_CALL begin()const diff --git a/3rdParty/Boost/src/boost/regex/v4/basic_regex_creator.hpp b/3rdParty/Boost/src/boost/regex/v4/basic_regex_creator.hpp index efa9f7d..efb649c 100644 --- a/3rdParty/Boost/src/boost/regex/v4/basic_regex_creator.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/basic_regex_creator.hpp @@ -66,7 +66,7 @@ class basic_char_set public: typedef digraph<charT> digraph_type; typedef typename traits::string_type string_type; - typedef typename traits::char_class_type mask_type; + typedef typename traits::char_class_type m_type; basic_char_set() { @@ -100,12 +100,12 @@ public: } m_empty = false; } - void add_class(mask_type m) + void add_class(m_type m) { m_classes |= m; m_empty = false; } - void add_negated_class(mask_type m) + void add_negated_class(m_type m) { m_negated_classes |= m; m_empty = false; @@ -162,11 +162,11 @@ public: { return m_equivalents.end(); } - mask_type classes()const + m_type classes()const { return m_classes; } - mask_type negated_classes()const + m_type negated_classes()const { return m_negated_classes; } @@ -179,8 +179,8 @@ private: std::vector<digraph_type> m_ranges; // a list of end points of our ranges bool m_negate; // true if the set is to be negated bool m_has_digraphs; // true if we have digraphs present - mask_type m_classes; // character classes to match - mask_type m_negated_classes; // negated character classes to match + m_type m_classes; // character classes to match + m_type m_negated_classes; // negated character classes to match bool m_empty; // whether we've added anything yet std::vector<digraph_type> m_equivalents; // a list of equivalence classes }; @@ -241,6 +241,7 @@ protected: unsigned m_backrefs; // bitmask of permitted backrefs boost::uintmax_t m_bad_repeats; // bitmask of repeats we can't deduce a startmap for; bool m_has_recursions; // set when we have recursive expresisons to fixup + std::vector<bool> m_recursion_checks; // notes which recursions we've followed while analysing this expression typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character typename traits::char_class_type m_mask_space; // mask used to determine if a character is a word character typename traits::char_class_type m_lower_mask; // mask used to determine if a character is a lowercase character @@ -366,9 +367,9 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set( { typedef typename traits::string_type string_type; typedef typename basic_char_set<charT, traits>::list_iterator item_iterator; - typedef typename traits::char_class_type mask_type; + typedef typename traits::char_class_type m_type; - re_set_long<mask_type>* result = static_cast<re_set_long<mask_type>*>(append_state(syntax_element_long_set, sizeof(re_set_long<mask_type>))); + re_set_long<m_type>* result = static_cast<re_set_long<m_type>*>(append_state(syntax_element_long_set, sizeof(re_set_long<m_type>))); // // fill in the basics: // @@ -512,28 +513,23 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set( // // finally reset the address of our last state: // - m_last_state = result = static_cast<re_set_long<mask_type>*>(getaddress(offset)); + m_last_state = result = static_cast<re_set_long<m_type>*>(getaddress(offset)); return result; } -namespace{ - template<class T> inline bool char_less(T t1, T t2) { return t1 < t2; } -template<> -inline bool char_less<char>(char t1, char t2) +inline bool char_less(char t1, char t2) { return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2); } -template<> -inline bool char_less<signed char>(signed char t1, signed char t2) +inline bool char_less(signed char t1, signed char t2) { return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2); } -} template <class charT, class traits> re_syntax_base* basic_regex_creator<charT, traits>::append_set( @@ -597,7 +593,7 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set( } else { - if(char_less<charT>(c2, c1)) + if(char_less(c2, c1)) { // Oops error: return 0; @@ -609,8 +605,8 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set( // // and now the classes: // - typedef typename traits::char_class_type mask_type; - mask_type m = char_set.classes(); + typedef typename traits::char_class_type m_type; + m_type m = char_set.classes(); if(flags() & regbase::icase) { // adjust m as needed: @@ -712,6 +708,8 @@ void basic_regex_creator<charT, traits>::finalize(const charT* p1, const charT* m_pdata->m_can_be_null = 0; m_bad_repeats = 0; + if(m_has_recursions) + m_recursion_checks.assign(1 + m_pdata->m_mark_count, false); create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all); // get the restart type: m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state); @@ -948,9 +946,14 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state) state = state->next.p; } } + // now work through our list, building all the maps as we go: while(v.size()) { + // Initialize m_recursion_checks if we need it: + if(m_has_recursions) + m_recursion_checks.assign(1 + m_pdata->m_mark_count, false); + const std::pair<bool, re_syntax_base*>& p = v.back(); m_icase = p.first; state = p.second; @@ -960,6 +963,9 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state) m_bad_repeats = 0; create_startmap(state->next.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_take); m_bad_repeats = 0; + + if(m_has_recursions) + m_recursion_checks.assign(1 + m_pdata->m_mark_count, false); create_startmap(static_cast<re_alt*>(state)->alt.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_skip); // adjust the type of the state to allow for faster matching: state->type = this->get_repeat_type(state); @@ -971,7 +977,7 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state) template <class charT, class traits> int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state) { - typedef typename traits::char_class_type mask_type; + typedef typename traits::char_class_type m_type; int result = 0; while(state) { @@ -1024,10 +1030,10 @@ int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state state = rep->alt.p; continue; } - else if((state->type == syntax_element_long_set_rep)) + else if(state->type == syntax_element_long_set_rep) { BOOST_ASSERT(rep->next.p->type == syntax_element_long_set); - if(static_cast<re_set_long<mask_type>*>(rep->next.p)->singleton == 0) + if(static_cast<re_set_long<m_type>*>(rep->next.p)->singleton == 0) return -1; if(rep->max != rep->min) return -1; @@ -1038,7 +1044,7 @@ int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state } return -1; case syntax_element_long_set: - if(static_cast<re_set_long<mask_type>*>(state)->singleton == 0) + if(static_cast<re_set_long<m_type>*>(state)->singleton == 0) return -1; result += 1; break; @@ -1102,9 +1108,9 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, if(l_map) { l_map[0] |= mask_init; - l_map['\n'] |= mask; - l_map['\r'] |= mask; - l_map['\f'] |= mask; + l_map[static_cast<unsigned>('\n')] |= mask; + l_map[static_cast<unsigned>('\r')] |= mask; + l_map[static_cast<unsigned>('\f')] |= mask; l_map[0x85] |= mask; } // now figure out if we can match a NULL string at this point: @@ -1114,7 +1120,11 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, } case syntax_element_recurse: { - if(recursion_start == state) + if(state->type == syntax_element_startmark) + recursion_sub = static_cast<re_brace*>(state)->index; + else + recursion_sub = 0; + if(m_recursion_checks[recursion_sub]) { // Infinite recursion!! if(0 == this->m_pdata->m_status) // update the error code if not already set @@ -1139,12 +1149,10 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, recursion_start = state; recursion_restart = state->next.p; state = static_cast<re_jump*>(state)->alt.p; - if(state->type == syntax_element_startmark) - recursion_sub = static_cast<re_brace*>(state)->index; - else - recursion_sub = 0; + m_recursion_checks[recursion_sub] = true; break; } + m_recursion_checks[recursion_sub] = true; // fall through, can't handle nested recursion here... } case syntax_element_backref: @@ -1206,14 +1214,14 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, case syntax_element_long_set: if(l_map) { - typedef typename traits::char_class_type mask_type; - if(static_cast<re_set_long<mask_type>*>(state)->singleton) + typedef typename traits::char_class_type m_type; + if(static_cast<re_set_long<m_type>*>(state)->singleton) { l_map[0] |= mask_init; for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i) { charT c = static_cast<charT>(i); - if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<mask_type>*>(state), *m_pdata, m_icase)) + if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<m_type>*>(state), *m_pdata, l_icase)) l_map[i] |= mask; } } @@ -1289,8 +1297,8 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, if(l_map) { l_map[0] |= mask_init; - l_map['\n'] |= mask; - l_map['\r'] |= mask; + l_map[static_cast<unsigned>('\n')] |= mask; + l_map[static_cast<unsigned>('\r')] |= mask; } if(pnull) *pnull |= mask; @@ -1325,7 +1333,7 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, re_syntax_base* p = m_pdata->m_first_state; while(p) { - if((p->type == syntax_element_recurse)) + if(p->type == syntax_element_recurse) { re_brace* p2 = static_cast<re_brace*>(static_cast<re_jump*>(p)->alt.p); if((p2->type == syntax_element_startmark) && (p2->index == static_cast<re_brace*>(state)->index)) @@ -1456,7 +1464,7 @@ void basic_regex_creator<charT, traits>::set_bad_repeat(re_syntax_base* pt) template <class charT, class traits> syntax_element_type basic_regex_creator<charT, traits>::get_repeat_type(re_syntax_base* state) { - typedef typename traits::char_class_type mask_type; + typedef typename traits::char_class_type m_type; if(state->type == syntax_element_rep) { // check to see if we are repeating a single state: @@ -1471,7 +1479,7 @@ syntax_element_type basic_regex_creator<charT, traits>::get_repeat_type(re_synta case re_detail::syntax_element_set: return re_detail::syntax_element_short_set_rep; case re_detail::syntax_element_long_set: - if(static_cast<re_detail::re_set_long<mask_type>*>(state->next.p)->singleton) + if(static_cast<re_detail::re_set_long<m_type>*>(state->next.p)->singleton) return re_detail::syntax_element_long_set_rep; break; default: diff --git a/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp b/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp index 4dacfc6..72dc4ee 100644 --- a/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp @@ -191,6 +191,7 @@ void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_c this->m_pdata->m_status = error_code; m_position = m_end; // don't bother parsing anything else +#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS // // Augment error message with the regular expression text: // @@ -200,9 +201,9 @@ void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_c if(error_code != regex_constants::error_empty) { if((start_pos != 0) || (end_pos != (m_end - m_base))) - message += " The error occured while parsing the regular expression fragment: '"; + message += " The error occurred while parsing the regular expression fragment: '"; else - message += " The error occured while parsing the regular expression: '"; + message += " The error occurred while parsing the regular expression: '"; if(start_pos != end_pos) { message += std::string(m_base + start_pos, m_base + position); @@ -211,6 +212,7 @@ void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_c } message += "'."; } +#endif #ifndef BOOST_NO_EXCEPTIONS if(0 == (this->flags() & regex_constants::no_except)) @@ -660,6 +662,11 @@ template <class charT, class traits> bool basic_regex_parser<charT, traits>::parse_extended_escape() { ++m_position; + if(m_position == m_end) + { + fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found."); + return false; + } bool negate = false; // in case this is a character class escape: \w \d etc switch(this->m_traits.escape_syntax_type(*m_position)) { @@ -669,8 +676,8 @@ bool basic_regex_parser<charT, traits>::parse_extended_escape() case regex_constants::escape_type_class: { escape_type_class_jump: - typedef typename traits::char_class_type mask_type; - mask_type m = this->m_traits.lookup_classname(m_position, m_position+1); + typedef typename traits::char_class_type m_type; + m_type m = this->m_traits.lookup_classname(m_position, m_position+1); if(m != 0) { basic_char_set<charT, traits> char_set; @@ -941,7 +948,8 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_ ++m_position; } // for perl regexes only check for pocessive ++ repeats. - if((0 == (this->flags() & regbase::main_option_type)) + if((m_position != m_end) + && (0 == (this->flags() & regbase::main_option_type)) && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus)) { pocessive = true; @@ -1025,13 +1033,14 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_ { // // Check for illegal following quantifier, we have to do this here, because - // the extra states we insert below circumvents are usual error checking :-( + // the extra states we insert below circumvents our usual error checking :-( // switch(this->m_traits.syntax_type(*m_position)) { case regex_constants::syntax_star: case regex_constants::syntax_plus: case regex_constants::syntax_question: + case regex_constants::syntax_open_brace: fail(regex_constants::error_badrepeat, m_position - m_base); return false; } @@ -1381,8 +1390,8 @@ bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, tr ++name_first; negated = true; } - typedef typename traits::char_class_type mask_type; - mask_type m = this->m_traits.lookup_classname(name_first, name_last); + typedef typename traits::char_class_type m_type; + m_type m = this->m_traits.lookup_classname(name_first, name_last); if(m == 0) { if(char_set.empty() && (name_last - name_first == 1)) @@ -2087,6 +2096,14 @@ insert_recursion: return false; } v = this->m_traits.toi(m_position, m_end, 10); + if(m_position == m_end) + { + // Rewind to start of (? sequence: + --m_position; + while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; + fail(regex_constants::error_perl_extension, m_position - m_base); + return false; + } if(*m_position == charT('R')) { if(++m_position == m_end) @@ -2490,9 +2507,11 @@ option_group_jump: this->m_pdata->m_data.align(); re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset)); jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp); - if(this->m_last_state == jmp) + if((this->m_last_state == jmp) && (markid != -2)) { - // Oops... we didn't have anything inside the assertion: + // Oops... we didn't have anything inside the assertion. + // Note we don't get here for negated forward lookahead as (?!) + // does have some uses. // Rewind to start of (? sequence: --m_position; while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position; @@ -2711,6 +2730,8 @@ regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_opt } } while(!breakout); + + breakout = false; if(*m_position == static_cast<charT>('-')) { diff --git a/3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp b/3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp index cd22bd8..bcae455 100644 --- a/3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp @@ -1,7 +1,7 @@ /* * - * Copyright (c) 2004 - * John Maddock + * Copyright (c) 2004 John Maddock + * Copyright 2011 Garmin Ltd. or its subsidiaries * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file @@ -511,7 +511,9 @@ typename cpp_regex_traits_implementation<charT>::string_type // however at least one std lib will always throw // std::bad_alloc for certain arguments... // +#ifndef BOOST_NO_EXCEPTIONS try{ +#endif // // What we do here depends upon the format of the sort key returned by // sort key returned by this->transform: @@ -546,7 +548,9 @@ typename cpp_regex_traits_implementation<charT>::string_type result.erase(i); break; } +#ifndef BOOST_NO_EXCEPTIONS }catch(...){} +#endif while(result.size() && (charT(0) == *result.rbegin())) result.erase(result.size() - 1); if(result.empty()) @@ -576,7 +580,9 @@ typename cpp_regex_traits_implementation<charT>::string_type // std::bad_alloc for certain arguments... // string_type result; +#ifndef BOOST_NO_EXCEPTIONS try{ +#endif result = this->m_pcollate->transform(p1, p2); // // Borland's STLPort version returns a NULL-terminated @@ -593,10 +599,12 @@ typename cpp_regex_traits_implementation<charT>::string_type result.erase(result.size() - 1); #endif BOOST_ASSERT(std::find(result.begin(), result.end(), charT(0)) == result.end()); +#ifndef BOOST_NO_EXCEPTIONS } catch(...) { } +#endif return result; } diff --git a/3rdParty/Boost/src/boost/regex/v4/instances.hpp b/3rdParty/Boost/src/boost/regex/v4/instances.hpp index c62d136..2839c0b 100644 --- a/3rdParty/Boost/src/boost/regex/v4/instances.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/instances.hpp @@ -84,7 +84,10 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHA # ifdef BOOST_MSVC # pragma warning(push) -# pragma warning(disable : 4251 4231 4660) +# pragma warning(disable : 4251 4231) +# if BOOST_MSVC < 1600 +# pragma warning(disable : 4660) +# endif # endif template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; diff --git a/3rdParty/Boost/src/boost/regex/v4/match_results.hpp b/3rdParty/Boost/src/boost/regex/v4/match_results.hpp index ca9898f..63e5117 100644 --- a/3rdParty/Boost/src/boost/regex/v4/match_results.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/match_results.hpp @@ -33,7 +33,10 @@ namespace boost{ #ifdef BOOST_MSVC #pragma warning(push) -#pragma warning(disable : 4251 4231 4660) +#pragma warning(disable : 4251 4231) +# if BOOST_MSVC < 1600 +# pragma warning(disable : 4660) +# endif #endif namespace re_detail{ diff --git a/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp b/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp index 52cc55c..ddaafbd 100644 --- a/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp @@ -344,7 +344,10 @@ struct recursion_info #ifdef BOOST_MSVC #pragma warning(push) -#pragma warning(disable : 4251 4231 4660) +#pragma warning(disable : 4251 4231) +# if BOOST_MSVC < 1600 +# pragma warning(disable : 4660) +# endif #endif template <class BidiIterator, class Allocator, class traits> diff --git a/3rdParty/Boost/src/boost/regex/v4/perl_matcher_non_recursive.hpp b/3rdParty/Boost/src/boost/regex/v4/perl_matcher_non_recursive.hpp index 7ab6781..0da43e3 100644 --- a/3rdParty/Boost/src/boost/regex/v4/perl_matcher_non_recursive.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/perl_matcher_non_recursive.hpp @@ -828,9 +828,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat() #ifdef __BORLANDC__ #pragma option push -w-8008 -w-8066 -w-8004 #endif - typedef typename traits::char_class_type mask_type; + typedef typename traits::char_class_type m_type; const re_repeat* rep = static_cast<const re_repeat*>(pstate); - const re_set_long<mask_type>* set = static_cast<const re_set_long<mask_type>*>(pstate->next.p); + const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate->next.p); std::size_t count = 0; // // start by working out how much we can skip: @@ -1434,7 +1434,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat(bool template <class BidiIterator, class Allocator, class traits> bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool r) { - typedef typename traits::char_class_type mask_type; + typedef typename traits::char_class_type m_type; saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state); // if we have a match, just discard this state: @@ -1447,7 +1447,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool const re_repeat* rep = pmp->rep; std::size_t count = pmp->count; pstate = rep->next.p; - const re_set_long<mask_type>* set = static_cast<const re_set_long<mask_type>*>(pstate); + const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate); position = pmp->last_position; BOOST_ASSERT(rep->type == syntax_element_long_set_rep); diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp index 4406839..3b1d19d 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp @@ -180,8 +180,14 @@ private: } inline int toi(ForwardIter& i, ForwardIter j, int base) { +#if defined(_MSC_VER) && defined(__INTEL_COMPILER) && ((__INTEL_COMPILER == 9999) || (__INTEL_COMPILER == 1210)) + // Workaround for Intel support issue #656654. + // See also https://svn.boost.org/trac/boost/ticket/6359 + return toi(i, j, base, mpl::false_()); +#else typedef typename boost::is_convertible<ForwardIter, const char_type*&>::type tag_type; return toi(i, j, base, tag_type()); +#endif } const traits& m_traits; // the traits class for localised formatting operations @@ -842,7 +848,15 @@ OutputIterator regex_format_imp(OutputIterator out, BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator) -struct any_type { any_type(...); }; +struct any_type +{ + template <class T> + any_type(const T&); + template <class T, class U> + any_type(const T&, const U&); + template <class T, class U, class V> + any_type(const T&, const U&, const V&); +}; typedef char no_type; typedef char (&unary_type)[2]; typedef char (&binary_type)[3]; diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_iterator.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_iterator.hpp index c2f2c49..09e75c6 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_iterator.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_iterator.hpp @@ -68,7 +68,7 @@ public: // flags |= match_prev_avail; BidirectionalIterator next_start = what[0].second; match_flag_type f(flags); - if(!what.length()) + if(!what.length() || (f & regex_constants::match_posix)) f |= regex_constants::match_not_initial_null; //if(base != next_start) // f |= regex_constants::match_not_bob; diff --git a/3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp b/3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp index 4b0ac92..de16771 100644 --- a/3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp @@ -317,14 +317,14 @@ inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(cons template <std::size_t N> inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { - return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, m); + return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m); } #endif template <class charT, class Traits, class Alloc, std::size_t N> inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) { typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type; - return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m); + return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m); } template <std::size_t N> inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) @@ -354,7 +354,7 @@ template <class charT, class Traits, class Alloc> inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type; - return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, m); + return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m); } inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default) { |