diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/regex/v4/perl_matcher_recursive.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/regex/v4/perl_matcher_recursive.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/regex/v4/perl_matcher_recursive.hpp | 16 |
1 files changed, 14 insertions, 2 deletions
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 @@ -641,7 +641,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat() if(::boost::is_random_access_iterator<BidiIterator>::value) { 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))]) { @@ -731,7 +737,13 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat() if(::boost::is_random_access_iterator<BidiIterator>::value) { 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))) { |