diff options
Diffstat (limited to '3rdParty/Boost/src/boost/regex')
24 files changed, 270 insertions, 181 deletions
| diff --git a/3rdParty/Boost/src/boost/regex/config.hpp b/3rdParty/Boost/src/boost/regex/config.hpp index e8cec5b..7e6cc51 100644 --- a/3rdParty/Boost/src/boost/regex/config.hpp +++ b/3rdParty/Boost/src/boost/regex/config.hpp @@ -225,5 +225,5 @@   ****************************************************************************/ -#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1200) && defined(_MSC_EXTENSIONS) +#if defined(BOOST_MSVC) && defined(_MSC_EXTENSIONS)  #if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL)  #  define BOOST_REGEX_CALL __cdecl diff --git a/3rdParty/Boost/src/boost/regex/icu.hpp b/3rdParty/Boost/src/boost/regex/icu.hpp index 772806e..37fec2a 100644 --- a/3rdParty/Boost/src/boost/regex/icu.hpp +++ b/3rdParty/Boost/src/boost/regex/icu.hpp @@ -424,5 +424,5 @@ bool do_regex_match(BidiIterator first, BidiIterator last,     typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;     typedef match_results<conv_type>                   match_type; -   typedef typename match_type::allocator_type        alloc_type; +   //typedef typename match_type::allocator_type        alloc_type;     match_type what;     bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags); @@ -440,5 +440,5 @@ bool do_regex_match(BidiIterator first, BidiIterator last,     typedef u8_to_u32_iterator<BidiIterator, UChar32>  conv_type;     typedef match_results<conv_type>                   match_type; -   typedef typename match_type::allocator_type        alloc_type; +   //typedef typename match_type::allocator_type        alloc_type;     match_type what;     bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags); @@ -599,5 +599,5 @@ bool do_regex_search(BidiIterator first, BidiIterator last,     typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;     typedef match_results<conv_type>                   match_type; -   typedef typename match_type::allocator_type        alloc_type; +   //typedef typename match_type::allocator_type        alloc_type;     match_type what;     bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base)); @@ -616,5 +616,5 @@ bool do_regex_search(BidiIterator first, BidiIterator last,     typedef u8_to_u32_iterator<BidiIterator, UChar32>  conv_type;     typedef match_results<conv_type>                   match_type; -   typedef typename match_type::allocator_type        alloc_type; +   //typedef typename match_type::allocator_type        alloc_type;     match_type what;     bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base)); @@ -888,7 +888,4 @@ inline OutputIterator u32regex_replace(OutputIterator out,  {     return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -   <OutputIterator> -#endif      (        re_detail::do_regex_replace( @@ -910,7 +907,4 @@ inline OutputIterator u32regex_replace(OutputIterator out,  {     return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -   <OutputIterator> -#endif      (        re_detail::do_regex_replace( @@ -932,7 +926,4 @@ inline OutputIterator u32regex_replace(OutputIterator out,  {     return re_detail::extract_output_base -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) -   <OutputIterator> -#endif     (        re_detail::do_regex_replace( diff --git a/3rdParty/Boost/src/boost/regex/pending/static_mutex.hpp b/3rdParty/Boost/src/boost/regex/pending/static_mutex.hpp index 9c10050..344926f 100644 --- a/3rdParty/Boost/src/boost/regex/pending/static_mutex.hpp +++ b/3rdParty/Boost/src/boost/regex/pending/static_mutex.hpp @@ -37,12 +37,5 @@  namespace boost{ -class BOOST_REGEX_DECL scoped_static_mutex_lock; - -class static_mutex -{ -public: -   typedef scoped_static_mutex_lock scoped_lock; -   pthread_mutex_t m_mutex; -}; +class static_mutex;  #define BOOST_STATIC_MUTEX_INIT { PTHREAD_MUTEX_INITIALIZER, } @@ -68,4 +61,10 @@ private:  }; +class static_mutex +{ +public: +   typedef scoped_static_mutex_lock scoped_lock; +   pthread_mutex_t m_mutex; +};  } // namespace boost @@ -127,10 +126,13 @@ private:  // dependencies so that build tools don't find them.  // -#define B1 <boost/thread/once.hpp> -#define B2 <boost/thread/recursive_mutex.hpp> -#include B1 -#include B2 -#undef B1 -#undef B2 +#define BOOST_REGEX_H1 <boost/thread/once.hpp> +#define BOOST_REGEX_H2 <boost/thread/recursive_mutex.hpp> +#define BOOST_REGEX_H3 <boost/thread/lock_types.hpp> +#include BOOST_REGEX_H1 +#include BOOST_REGEX_H2 +#include BOOST_REGEX_H3 +#undef BOOST_REGEX_H1 +#undef BOOST_REGEX_H2 +#undef BOOST_REGEX_H3  namespace boost{ @@ -160,5 +162,5 @@ public:     void unlock();  private: -   boost::recursive_mutex::scoped_lock* m_plock; +   boost::unique_lock<boost::recursive_mutex>* m_plock;     bool m_have_lock;  }; diff --git a/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp b/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp index e6399b5..b84cfa0 100644 --- a/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp +++ b/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp @@ -142,5 +142,5 @@ class u32_to_u16_iterator     typedef boost::iterator_facade<u32_to_u16_iterator<BaseIterator, U16Type>, U16Type, std::bidirectional_iterator_tag, const U16Type> base_type; -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS)     typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type; @@ -257,5 +257,5 @@ class u16_to_u32_iterator     BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS)     typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type; @@ -372,5 +372,5 @@ class u32_to_u8_iterator     typedef boost::iterator_facade<u32_to_u8_iterator<BaseIterator, U8Type>, U8Type, std::bidirectional_iterator_tag, const U8Type> base_type; -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS)     typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type; @@ -500,5 +500,5 @@ class u8_to_u32_iterator     BOOST_STATIC_CONSTANT(U32Type, pending_read = 0xffffffffu); -#if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_STD_ITERATOR_TRAITS)     typedef typename std::iterator_traits<BaseIterator>::value_type base_value_type; @@ -521,7 +521,24 @@ public:     void increment()     { +      // We must not start with a continuation character: +      if((static_cast<boost::uint8_t>(*m_position) & 0xC0) == 0x80) +         invalid_sequence();        // skip high surrogate first if there is one:        unsigned c = detail::utf8_byte_count(*m_position); -      std::advance(m_position, c); +      if(m_value == pending_read) +      { +         // Since we haven't read in a value, we need to validate the code points: +         for(unsigned i = 0; i < c; ++i) +         { +            ++m_position; +            // We must have a continuation byte: +            if((i != c - 1) && ((static_cast<boost::uint8_t>(*m_position) & 0xC0) != 0x80)) +               invalid_sequence(); +         } +      } +      else +      { +         std::advance(m_position, c); +      }        m_value = pending_read;     } @@ -590,5 +607,5 @@ private:        if((m_value & 0xC0u) == 0x80u)           invalid_sequence(); -      // see how many extra byts we have: +      // see how many extra bytes we have:        unsigned extra = detail::utf8_trailing_byte_count(*m_position);        // extract the extra bits, 6 from each extra byte: @@ -598,4 +615,7 @@ private:           ++next;           m_value <<= 6; +         // We must have a continuation byte: +         if((static_cast<boost::uint8_t>(*next) & 0xC0) != 0x80) +            invalid_sequence();           m_value += static_cast<boost::uint8_t>(*next) & 0x3Fu;        } @@ -610,7 +630,13 @@ private:        };        m_value &= masks[extra]; -      // check the result: +      // check the result is in range:        if(m_value > static_cast<U32Type>(0x10FFFFu))           invalid_sequence(); +      // The result must not be a surrogate: +      if((m_value >= static_cast<U32Type>(0xD800)) && (m_value <= static_cast<U32Type>(0xDFFF))) +         invalid_sequence(); +      // We should not have had an invalidly encoded UTF8 sequence: +      if((extra > 0) && (m_value <= static_cast<U32Type>(masks[extra - 1]))) +         invalid_sequence();     }     BaseIterator m_position; diff --git a/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp b/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp index 0b63e3a..ae86152 100644 --- a/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp @@ -237,7 +237,5 @@ public:     std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const     { -      if(n == 0) -         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); +      const std::pair<std::size_t, std::size_t>& pi = this->m_subs.at(n);        std::pair<const_iterator, const_iterator> p(expression() + pi.first, expression() + pi.second);        return p; @@ -267,5 +265,5 @@ public:     size_type BOOST_REGEX_CALL mark_count()const     { -      return this->m_mark_count; +      return this->m_mark_count - 1;     }     const re_detail::re_syntax_base* get_first_state()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 efb649c..821fb82 100644 --- a/3rdParty/Boost/src/boost/regex/v4/basic_regex_creator.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/basic_regex_creator.hpp @@ -48,7 +48,5 @@ struct digraph : public std::pair<charT, charT>     digraph(charT c1, charT c2) : std::pair<charT, charT>(c1, c2)     {} -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)     digraph(const digraph<charT>& d) : std::pair<charT, charT>(d.first, d.second){} -#endif     template <class Seq>     digraph(const Seq& s) : std::pair<charT, charT>() @@ -347,5 +345,5 @@ re_literal* basic_regex_creator<charT, traits>::append_literal(charT c)        charT* characters = static_cast<charT*>(static_cast<void*>(result+1));        characters[result->length] = m_traits.translate(c, m_icase); -      ++(result->length); +      result->length += 1;     }     return result; @@ -434,18 +432,8 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set(        {           // we need to transform our range into sort keys: -#if BOOST_WORKAROUND(__GNUC__, < 3) -         string_type in(3, charT(0)); -         in[0] = c1.first; -         in[1] = c1.second; -         s1 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); -         in[0] = c2.first; -         in[1] = c2.second; -         s2 = this->m_traits.transform(in.c_str(), (in[1] ? in.c_str()+2 : in.c_str()+1)); -#else           charT a1[3] = { c1.first, c1.second, charT(0), };           charT a2[3] = { c2.first, c2.second, charT(0), };           s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1));           s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1)); -#endif           if(s1.size() == 0)              s1 = string_type(1, charT(0)); @@ -492,13 +480,6 @@ re_syntax_base* basic_regex_creator<charT, traits>::append_set(        if(first->second)        { -#if BOOST_WORKAROUND(__GNUC__, < 3) -         string_type in(3, charT(0)); -         in[0] = first->first; -         in[1] = first->second; -         s = m_traits.transform_primary(in.c_str(), in.c_str()+2); -#else           charT cs[3] = { first->first, first->second, charT(0), };           s = m_traits.transform_primary(cs, cs+2); -#endif        }        else @@ -739,12 +720,12 @@ void basic_regex_creator<charT, traits>::fixup_pointers(re_syntax_base* state)           // set the state_id of this repeat:           static_cast<re_repeat*>(state)->state_id = m_repeater_id++; -         // fall through: +         BOOST_FALLTHROUGH;        case syntax_element_alt:           std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map));           static_cast<re_alt*>(state)->can_be_null = 0; -         // fall through: +         BOOST_FALLTHROUGH;        case syntax_element_jump:           static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state); -         // fall through again: +         BOOST_FALLTHROUGH;        default:           if(state->next.i) @@ -878,4 +859,5 @@ void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)              }           } +         break;        default:           break; @@ -942,5 +924,5 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)              }           } -         // fall through: +         BOOST_FALLTHROUGH;        default:           state = state->next.p; @@ -1154,5 +1136,6 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,              }              m_recursion_checks[recursion_sub] = true; -            // fall through, can't handle nested recursion here... +            // can't handle nested recursion here... +            BOOST_FALLTHROUGH;           }        case syntax_element_backref: @@ -1160,5 +1143,5 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,           if(pnull)              *pnull |= mask; -         // fall through: +         BOOST_FALLTHROUGH;        case syntax_element_wild:        { @@ -1360,5 +1343,5 @@ void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state,              break;           } -         // otherwise fall through: +         BOOST_FALLTHROUGH;        default:           state = state->next.p; @@ -1457,4 +1440,5 @@ void basic_regex_creator<charT, traits>::set_bad_repeat(re_syntax_base* pt)              m_bad_repeats |= (one << state_id);        } +      break;     default:        break; @@ -1538,5 +1522,5 @@ void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* st           if(this->m_has_backrefs == 0)              static_cast<re_repeat*>(state)->leading = true; -         // fall through: +         BOOST_FALLTHROUGH;        default:           return; 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 72dc4ee..2757898 100644 --- a/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp @@ -370,5 +370,5 @@ bool basic_regex_parser<charT, traits>::parse_extended()           return true;        } -      // Otherwise fall through: +      BOOST_FALLTHROUGH;     default:        result = parse_literal(); @@ -624,5 +624,5 @@ bool basic_regex_parser<charT, traits>::parse_basic_escape()           case 'w':              negate = false; -            // fall through: +            BOOST_FALLTHROUGH;           case 'W':              { @@ -641,5 +641,5 @@ bool basic_regex_parser<charT, traits>::parse_basic_escape()           case 's':              negate = false; -            // fall through: +            BOOST_FALLTHROUGH;           case 'S':              return add_emacs_code(negate); @@ -673,5 +673,5 @@ bool basic_regex_parser<charT, traits>::parse_extended_escape()     case regex_constants::escape_type_not_class:        negate = true; -      // fall through: +      BOOST_FALLTHROUGH;     case regex_constants::escape_type_class:        { @@ -743,5 +743,5 @@ escape_type_class_jump:     case regex_constants::escape_type_not_property:        negate = true; -      // fall through: +      BOOST_FALLTHROUGH;     case regex_constants::escape_type_property:        { @@ -902,5 +902,5 @@ escape_type_class_jump:        if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))           goto escape_type_class_jump; -      // fallthrough: +      BOOST_FALLTHROUGH;     default:        this->append_literal(unescape_character()); @@ -972,5 +972,5 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_        re_literal* lit = static_cast<re_literal*>(this->m_last_state);        charT c = (static_cast<charT*>(static_cast<void*>(lit+1)))[lit->length - 1]; -      --(lit->length); +      lit->length -= 1;        // now append new state:        lit = static_cast<re_literal*>(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT))); @@ -1071,24 +1071,44 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)     while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))        ++m_position; -   // fail if at end:     if(this->m_position == this->m_end)     { -      fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); -      return false; +      if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) +      { +         fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); +         return false; +      } +      // Treat the opening '{' as a literal character, rewind to start of error: +      --m_position; +      while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; +      return parse_literal();     }     // get min:     v = this->m_traits.toi(m_position, m_end, 10);     // skip whitespace: -   while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) -      ++m_position;     if(v < 0)     { -      fail(regex_constants::error_badbrace, this->m_position - this->m_base); -      return false; +      if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) +      { +         fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); +         return false; +      } +      // Treat the opening '{' as a literal character, rewind to start of error: +      --m_position; +      while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; +      return parse_literal();     } -   else if(this->m_position == this->m_end) +   while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space)) +      ++m_position; +   if(this->m_position == this->m_end)     { -      fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); -      return false; +      if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) +      { +         fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); +         return false; +      } +      // Treat the opening '{' as a literal character, rewind to start of error: +      --m_position; +      while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; +      return parse_literal();     }     min = v; @@ -1103,10 +1123,17 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)        if(this->m_position == this->m_end)        { -         fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); -         return false; +         if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) +         { +            fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); +            return false; +         } +         // Treat the opening '{' as a literal character, rewind to start of error: +         --m_position; +         while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; +         return parse_literal();        }        // get the value if any:        v = this->m_traits.toi(m_position, m_end, 10); -      max = (v >= 0) ? v : (std::numeric_limits<std::size_t>::max)(); +      max = (v >= 0) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();     }     else @@ -1121,6 +1148,13 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)     if(this->m_position == this->m_end)     { -      fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); -      return false; +      if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) +      { +         fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); +         return false; +      } +      // Treat the opening '{' as a literal character, rewind to start of error: +      --m_position; +      while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; +      return parse_literal();     }     if(isbasic) @@ -1145,6 +1179,8 @@ bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)     else     { -      fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message); -      return false; +      // Treat the opening '{' as a literal character, rewind to start of error: +      --m_position; +      while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position; +      return parse_literal();     }     // @@ -1960,5 +1996,5 @@ bool basic_regex_parser<charT, traits>::parse_perl_extension()     case regex_constants::syntax_or:        m_mark_reset = m_mark_count; -      // fall through: +      BOOST_FALLTHROUGH;     case regex_constants::syntax_colon:        // 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 bcae455..106ffcb 100644 --- a/3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp @@ -21,4 +21,6 @@  #include <boost/config.hpp> +#include <boost/integer.hpp> +#include <boost/type_traits/make_unsigned.hpp>  #ifndef BOOST_NO_STD_LOCALE @@ -108,4 +110,6 @@ typename parser_buf<charT, traits>::pos_type  parser_buf<charT, traits>::seekoff(off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which)  { +   typedef typename boost::int_t<sizeof(way) * CHAR_BIT>::least cast_type; +     if(which & ::std::ios_base::out)        return pos_type(off_type(-1)); @@ -113,5 +117,5 @@ parser_buf<charT, traits>::seekoff(off_type off, ::std::ios_base::seekdir way, :     std::ptrdiff_t pos = this->gptr() - this->eback();     charT* g = this->eback(); -   switch(way) +   switch(static_cast<cast_type>(way))     {     case ::std::ios_base::beg: @@ -505,6 +509,16 @@ typename cpp_regex_traits_implementation<charT>::string_type     //     BOOST_ASSERT(*p2 == 0); -     string_type result; +#if defined(_CPPLIB_VER) +   // +   // A bug in VC11 and 12 causes the program to hang if we pass a null-string +   // to std::collate::transform, but only for certain locales :-( +   // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware). +   // +   if(*p1 == 0) +   { +      return string_type(1, charT(0)); +   } +#endif     //     // swallowing all exceptions here is a bad idea @@ -580,5 +594,16 @@ typename cpp_regex_traits_implementation<charT>::string_type     // std::bad_alloc for certain arguments...     // -   string_type result; +   string_type result, result2; +#if defined(_CPPLIB_VER) +   // +   // A bug in VC11 and 12 causes the program to hang if we pass a null-string +   // to std::collate::transform, but only for certain locales :-( +   // Probably effects Intel and Clang or any compiler using the VC std library (Dinkumware). +   // +   if(*p1 == 0) +   { +      return result; +   } +#endif  #ifndef BOOST_NO_EXCEPTIONS     try{ @@ -599,5 +624,27 @@ 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()); +      // +      // We may have NULL's used as separators between sections of the collate string, +      // an example would be Boost.Locale.  We have no way to detect this case via +      // #defines since this can be used with any compiler/platform combination. +      // Unfortunately our state machine (which was devised when all implementations +      // used underlying C language API's) can't cope with that case.  One workaround +      // is to replace each character with 2, fortunately this code isn't used that +      // much as this is now slower than before :-( +      // +      typedef typename make_unsigned<charT>::type uchar_type; +      result2.reserve(result.size() * 2 + 2); +      for(unsigned i = 0; i < result.size(); ++i) +      { +         if(static_cast<uchar_type>(result[i]) == (std::numeric_limits<uchar_type>::max)()) +         { +            result2.append(1, charT((std::numeric_limits<uchar_type>::max)())).append(1, charT('b')); +         } +         else +         { +            result2.append(1, static_cast<charT>(1 + static_cast<uchar_type>(result[i]))).append(1, charT('b') - 1); +         } +      } +      BOOST_ASSERT(std::find(result2.begin(), result2.end(), charT(0)) == result2.end());  #ifndef BOOST_NO_EXCEPTIONS     } @@ -606,5 +653,5 @@ typename cpp_regex_traits_implementation<charT>::string_type     }  #endif -   return result; +   return result2;  } @@ -622,5 +669,4 @@ typename cpp_regex_traits_implementation<charT>::string_type     }  #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ -               && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\                 && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)     std::string name(p1, p2); @@ -633,5 +679,4 @@ typename cpp_regex_traits_implementation<charT>::string_type     name = lookup_default_collate_name(name);  #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ -               && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\                 && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)     if(name.size()) @@ -855,5 +900,5 @@ bool cpp_regex_traits_implementation<charT>::isctype(const charT c, char_class_t  template <class charT> -inline boost::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +inline boost::shared_ptr<const cpp_regex_traits_implementation<charT> > create_cpp_regex_traits(const std::locale& l)  {     cpp_regex_traits_base<charT> key(l); diff --git a/3rdParty/Boost/src/boost/regex/v4/instances.hpp b/3rdParty/Boost/src/boost/regex/v4/instances.hpp index 2839c0b..6fa811d 100644 --- a/3rdParty/Boost/src/boost/regex/v4/instances.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/instances.hpp @@ -93,7 +93,5 @@ template class BOOST_REGEX_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHA  template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >; -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)  template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >; -#endif  #ifndef BOOST_NO_STD_ALLOCATOR  template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >; @@ -103,7 +101,5 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher<BOOST_     && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\     && !defined(BOOST_REGEX_ICU_INSTANCES) -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)  template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >; -#endif  #ifndef BOOST_NO_STD_ALLOCATOR  template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >; @@ -122,5 +118,5 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::re_detail::perl_matcher< std::  #undef BOOST_REGEX_TEMPLATE_DECL -#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_EXTERN_TEMPLATE) +#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE)  #  ifndef BOOST_REGEX_INSTANTIATE diff --git a/3rdParty/Boost/src/boost/regex/v4/iterator_traits.hpp b/3rdParty/Boost/src/boost/regex/v4/iterator_traits.hpp index f7afacb..53e1376 100644 --- a/3rdParty/Boost/src/boost/regex/v4/iterator_traits.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/iterator_traits.hpp @@ -34,5 +34,5 @@ namespace boost{  namespace re_detail{ -#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if defined(BOOST_NO_STD_ITERATOR_TRAITS)  template <class T> diff --git a/3rdParty/Boost/src/boost/regex/v4/match_flags.hpp b/3rdParty/Boost/src/boost/regex/v4/match_flags.hpp index 26bde9a..e21de6c 100644 --- a/3rdParty/Boost/src/boost/regex/v4/match_flags.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/match_flags.hpp @@ -72,5 +72,5 @@ typedef enum _match_flags  } match_flags; -#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BORLANDC__) +#if defined(__BORLANDC__)  typedef unsigned long match_flag_type;  #else diff --git a/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp b/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp index ddaafbd..0a37a84 100644 --- a/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/perl_matcher.hpp @@ -87,5 +87,4 @@ inline bool can_start(unsigned int c, const unsigned char* map, unsigned char ma  //  #ifndef _RWSTD_VER -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)  template <class C, class T, class A>  inline int string_compare(const std::basic_string<C,T,A>& s, const C* p) @@ -98,7 +97,5 @@ inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)     return s.compare(p);   } -#endif  #else -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1310)  template <class C, class T, class A>  inline int string_compare(const std::basic_string<C,T,A>& s, const C* p) @@ -111,5 +108,4 @@ inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)     return s.compare(p);   } -#endif  inline int string_compare(const std::string& s, const char* p)  { return std::strcmp(s.c_str(), p); } diff --git a/3rdParty/Boost/src/boost/regex/v4/perl_matcher_common.hpp b/3rdParty/Boost/src/boost/regex/v4/perl_matcher_common.hpp index b8c4e96..480d8f1 100644 --- a/3rdParty/Boost/src/boost/regex/v4/perl_matcher_common.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/perl_matcher_common.hpp @@ -66,4 +66,6 @@ void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_r        else if((re_f & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex))           m_match_flags |= match_perl; +      else if((re_f & (regbase::main_option_type|regbase::literal)) == (regbase::literal)) +         m_match_flags |= match_perl;        else           m_match_flags |= match_posix; @@ -199,5 +201,5 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()     state_count = 0;     m_match_flags |= regex_constants::match_all; -   m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last); +   m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last);     m_presult->set_base(base);     m_presult->set_named_subs(this->re.get_named_subs()); @@ -261,5 +263,5 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()        search_base = position = base;        pstate = re.get_first_state(); -      m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), base, last); +      m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), base, last);        m_presult->set_base(base);        m_presult->set_named_subs(this->re.get_named_subs()); @@ -280,5 +282,5 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()        }        // reset $` start: -      m_presult->set_size((m_match_flags & match_nosubs) ? 1 : re.mark_count(), search_base, last); +      m_presult->set_size((m_match_flags & match_nosubs) ? 1 : 1 + re.mark_count(), search_base, last);        //if((base != search_base) && (base == backstop))        //   m_match_flags |= match_prev_avail; @@ -286,5 +288,5 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()     if(m_match_flags & match_posix)     { -      m_result.set_size(re.mark_count(), base, last); +      m_result.set_size(1 + re.mark_count(), base, last);        m_result.set_base(base);     } @@ -327,4 +329,8 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_prefix()        m_presult->set_second(last, 0, false);        position = last; +      if((m_match_flags & match_posix) == match_posix) +      { +         m_result.maybe_assign(*m_presult); +      }     }  #ifdef BOOST_REGEX_MATCH_EXTRA @@ -453,9 +459,5 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()     {        // prev and this character must be opposites: -   #if defined(BOOST_REGEX_USE_C_LOCALE) && defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) -      b = traits::isctype(*position, m_word_mask); -   #else        b = traits_inst.isctype(*position, m_word_mask); -   #endif     }     else 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 0da43e3..5c1f7a9 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 @@ -704,5 +704,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()     {        BidiIterator end = position; -      std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); +      // Move end forward by "desired", preferably without using distance or advance if we can +      // as these can be slow for some iterator types. +      std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::re_detail::distance(position, last); +      if(desired >= len) +         end = last; +      else +         std::advance(end, desired);        BidiIterator origin(position);        while((position != end) && (traits_inst.translate(*position, icase) == what)) @@ -772,5 +778,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()     {        BidiIterator end = position; -      std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); +      // Move end forward by "desired", preferably without using distance or advance if we can +      // as these can be slow for some iterator types. +      std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::re_detail::distance(position, last); +      if(desired >= len) +         end = last; +      else +         std::advance(end, desired);        BidiIterator origin(position);        while((position != end) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))]) @@ -841,5 +853,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()     {        BidiIterator end = position; -      std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); +      // Move end forward by "desired", preferably without using distance or advance if we can +      // as these can be slow for some iterator types. +      std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::re_detail::distance(position, last); +      if(desired >= len) +         end = last; +      else +         std::advance(end, desired);        BidiIterator origin(position);        while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) @@ -1269,4 +1287,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool     } +   // remember where we got to if this is a leading repeat: +   if((rep->leading) && (count < rep->max)) +      restart = position;     if(position == last)     { diff --git a/3rdParty/Boost/src/boost/regex/v4/perl_matcher_recursive.hpp b/3rdParty/Boost/src/boost/regex/v4/perl_matcher_recursive.hpp index 07a1c20..8e0e182 100644 --- a/3rdParty/Boost/src/boost/regex/v4/perl_matcher_recursive.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/perl_matcher_recursive.hpp @@ -642,5 +642,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()     {        BidiIterator end = position; -      std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); +      // Move end forward by "desired", preferably without using distance or advance if we can +      // as these can be slow for some iterator types. +      std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::re_detail::distance(position, last); +      if(desired >= len) +         end = last; +      else +         std::advance(end, desired);        BidiIterator origin(position);        while((position != end) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))]) @@ -732,5 +738,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()     {        BidiIterator end = position; -      std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired)); +      // Move end forward by "desired", preferably without using distance or advance if we can +      // as these can be slow for some iterator types. +      std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::re_detail::distance(position, last); +      if(desired >= len) +         end = last; +      else +         std::advance(end, desired);        BidiIterator origin(position);        while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase))) diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp index 3b1d19d..80c654e 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_format.hpp @@ -284,5 +284,6 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format              break;           } -         // fall through, not a special character: +         // not a special character: +         BOOST_FALLTHROUGH;        default:           put(*m_position); @@ -355,5 +356,5 @@ void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format        have_brace = true;        ++m_position; -      // fall through.... +      BOOST_FALLTHROUGH;     default:        // see if we have a number: @@ -1065,5 +1066,5 @@ struct format_functor_c_string     OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())     { -      typedef typename Match::char_type char_type; +      //typedef typename Match::char_type char_type;        const charT* end = func;        while(*end) ++end; @@ -1084,5 +1085,5 @@ struct format_functor_container     OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())     { -      typedef typename Match::char_type char_type; +      //typedef typename Match::char_type char_type;        return re_detail::regex_format_imp(i, m, func.begin(), func.end(), f, t);     } diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_raw_buffer.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_raw_buffer.hpp index 52d45a2..c7792e3 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_raw_buffer.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_raw_buffer.hpp @@ -130,5 +130,5 @@ public:        if(size_type(last - end) < n)           resize(n + (end - start)); -      register pointer result = end; +      pointer result = end;        end += n;        return result; diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_split.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_split.hpp index a7ae350..c12d7ba 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_split.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_split.hpp @@ -108,5 +108,5 @@ std::size_t regex_split(OutputIterator out,  {     typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator  ci_t; -   typedef typename match_results<ci_t>::allocator_type                        match_allocator; +   //typedef typename match_results<ci_t>::allocator_type                        match_allocator;     ci_t last = s.begin();     std::size_t init_size = max_split; @@ -120,5 +120,5 @@ std::size_t regex_split(OutputIterator out,     // is not exhausted, and we're not splitting sub-expressions rather      // than whitespace: -   if(max_split && (last != s.end()) && (e.mark_count() == 1)) +   if(max_split && (last != s.end()) && (e.mark_count() == 0))     {        *out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end()); diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_token_iterator.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_token_iterator.hpp index 4e8bc36..dbb0803 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_token_iterator.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_token_iterator.hpp @@ -23,5 +23,4 @@  #include <boost/detail/workaround.hpp>  #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ -      || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))  // @@ -46,8 +45,6 @@ namespace boost{  #ifdef BOOST_MSVC  #pragma warning(pop) -#endif -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) -#  pragma warning(push) -#  pragma warning(disable:4700) +#pragma warning(push) +#pragma warning(disable:4700)  #endif @@ -76,5 +73,4 @@ public:  #if !BOOST_WORKAROUND(__HP_aCC, < 60700)  #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ -      || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \        || BOOST_WORKAROUND(__HP_aCC, < 60700) @@ -210,5 +206,4 @@ public:  #if !BOOST_WORKAROUND(__HP_aCC, < 60700)  #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ -      || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \        || BOOST_WORKAROUND(__HP_aCC, < 60700) @@ -297,5 +292,4 @@ inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_ite     return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);  } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)  template <class charT, class traits, std::size_t N>  inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default) @@ -308,5 +302,4 @@ inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_ite     return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);  } -#endif  template <class charT, class traits>  inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default) @@ -320,8 +313,6 @@ inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_ite  } -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) -#  pragma warning(pop) -#endif  #ifdef BOOST_MSVC +#pragma warning(pop)  #pragma warning(push)  #pragma warning(disable: 4103) diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_traits.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_traits.hpp index f5f0402..8b1cb6f 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_traits.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_traits.hpp @@ -84,5 +84,5 @@ struct regex_traits : public implementationT  //  namespace re_detail{ -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) +#if !BOOST_WORKAROUND(__HP_aCC, < 60000)  BOOST_MPL_HAS_XXX_TRAIT_DEF(boost_extensions_tag)  #else @@ -137,5 +137,5 @@ struct compute_wrapper_base     typedef BaseT type;  }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !BOOST_WORKAROUND(__HP_aCC, < 60000) +#if !BOOST_WORKAROUND(__HP_aCC, < 60000)  template <class BaseT>  struct compute_wrapper_base<BaseT, false> diff --git a/3rdParty/Boost/src/boost/regex/v4/regex_traits_defaults.hpp b/3rdParty/Boost/src/boost/regex/v4/regex_traits_defaults.hpp index ca13f19..a087d78 100644 --- a/3rdParty/Boost/src/boost/regex/v4/regex_traits_defaults.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/regex_traits_defaults.hpp @@ -4,10 +4,10 @@   * John Maddock   * - * Use, modification and distribution are subject to the  - * Boost Software License, Version 1.0. (See accompanying file  + * Use, modification and distribution are subject to the + * Boost Software License, Version 1.0. (See accompanying file   * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)   *   */ -  +   /*    *   LOCATION:    see http://www.boost.org for most recent version. @@ -86,5 +86,5 @@ inline bool is_combining<unsigned char>(unsigned char)  }  #if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives -#ifdef _MSC_VER  +#ifdef _MSC_VER  template<>  inline bool is_combining<wchar_t>(wchar_t c) @@ -116,9 +116,9 @@ inline bool is_separator(charT c)  {     return BOOST_REGEX_MAKE_BOOL( -      (c == static_cast<charT>('\n'))  -      || (c == static_cast<charT>('\r'))  -      || (c == static_cast<charT>('\f'))  -      || (static_cast<boost::uint16_t>(c) == 0x2028u)  -      || (static_cast<boost::uint16_t>(c) == 0x2029u)  +      (c == static_cast<charT>('\n')) +      || (c == static_cast<charT>('\r')) +      || (c == static_cast<charT>('\f')) +      || (static_cast<boost::uint16_t>(c) == 0x2028u) +      || (static_cast<boost::uint16_t>(c) == 0x2029u)        || (static_cast<boost::uint16_t>(c) == 0x85u));  } @@ -178,5 +178,5 @@ int get_default_class_id(const charT* p1, const charT* p2)     }; -   static const character_pointer_range<charT> ranges[21] =  +   static const character_pointer_range<charT> ranges[21] =     {        {data+0, data+5,}, // alnum @@ -204,5 +204,5 @@ int get_default_class_id(const charT* p1, const charT* p2)     static const character_pointer_range<charT>* ranges_begin = ranges;     static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0])); -    +     character_pointer_range<charT> t = { p1, p2, };     const character_pointer_range<charT>* p = std::lower_bound(ranges_begin, ranges_end, t); @@ -325,13 +325,13 @@ inline const charT* get_escape_R_string()  #  pragma warning(disable:4309 4245)  #endif -   static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?',  -      '|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}',  +   static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?', +      '|', '[', '\x0A', '\x0B', '\x0C', static_cast<unsigned char>('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}',                  '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' }; -   static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',  -      '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' }; +   static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?', +      '|', '[', '\x0A', '\x0B', '\x0C', static_cast<unsigned char>('\x85'), ']', ')', '\0' };     charT c = static_cast<charT>(0x2029u);     bool b = (static_cast<unsigned>(c) == 0x2029u); -    +     return (b ? e1 : e2);  #ifdef BOOST_MSVC @@ -347,5 +347,5 @@ inline const char* get_escape_R_string<char>()  #  pragma warning(disable:4309)  #endif -   static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',  +   static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',        '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' };     return e2; diff --git a/3rdParty/Boost/src/boost/regex/v4/sub_match.hpp b/3rdParty/Boost/src/boost/regex/v4/sub_match.hpp index 34a8684..7ce8d53 100644 --- a/3rdParty/Boost/src/boost/regex/v4/sub_match.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/sub_match.hpp @@ -37,5 +37,5 @@ struct sub_match : public std::pair<BidiIterator, BidiIterator>  {     typedef typename re_detail::regex_iterator_traits<BidiIterator>::value_type       value_type; -#if defined(BOOST_NO_STD_ITERATOR_TRAITS) || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if defined(BOOST_NO_STD_ITERATOR_TRAITS)     typedef          std::ptrdiff_t                                                   difference_type;  #else @@ -51,5 +51,4 @@ struct sub_match : public std::pair<BidiIterator, BidiIterator>     sub_match(BidiIterator i) : std::pair<BidiIterator, BidiIterator>(i, i), matched(false) {}  #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ -               && !BOOST_WORKAROUND(BOOST_MSVC, < 1310)\                 && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)\                 && !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) 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 de16771..e8649f3 100644 --- a/3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp @@ -21,5 +21,4 @@  #if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ -      || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))  // @@ -38,5 +37,5 @@ namespace boost{  #  include BOOST_ABI_PREFIX  #endif -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) +#ifdef BOOST_MSVC  #  pragma warning(push)  #  pragma warning(disable:4700) @@ -63,8 +62,5 @@ public:     u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)        : end(last), re(*p), flags(f), subs(v){} -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -      // can't reliably get this to work.... -#elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ -      || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ +#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \        || BOOST_WORKAROUND(__HP_aCC, < 60700) @@ -196,8 +192,5 @@ public:           pdata.reset();     } -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -      // can't reliably get this to work.... -#elif (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\ -      || BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ +#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\        || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \        || BOOST_WORKAROUND(__HP_aCC, < 60700) @@ -300,5 +293,4 @@ inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const  } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)  // construction from a reference to an array:  template <std::size_t N> @@ -332,5 +324,4 @@ inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const     return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);  } -#endif // BOOST_MSVC < 1300  // construction from a vector of sub_match state_id's: @@ -362,5 +353,5 @@ inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const  } -#if BOOST_WORKAROUND(BOOST_MSVC, > 1300) +#ifdef BOOST_MSVC  #  pragma warning(pop)  #endif diff --git a/3rdParty/Boost/src/boost/regex/v4/w32_regex_traits.hpp b/3rdParty/Boost/src/boost/regex/v4/w32_regex_traits.hpp index d556207..ef934b7 100644 --- a/3rdParty/Boost/src/boost/regex/v4/w32_regex_traits.hpp +++ b/3rdParty/Boost/src/boost/regex/v4/w32_regex_traits.hpp @@ -400,5 +400,4 @@ typename w32_regex_traits_implementation<charT>::string_type     }  #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ -               && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\                 && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)     std::string name(p1, p2); @@ -411,5 +410,4 @@ typename w32_regex_traits_implementation<charT>::string_type     name = lookup_default_collate_name(name);  #if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\ -               && !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\                 && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)     if(name.size()) @@ -553,5 +551,5 @@ typename w32_regex_traits_implementation<charT>::char_class_type  template <class charT> -boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(charT)) +boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::re_detail::lcid_type l)  {     // TODO: create a cache for previously constructed objects. | 
 Swift
 Swift