summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-08-02 20:41:55 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-08-02 21:03:09 (GMT)
commitd5ace22054203c7989691ae8b3fa4e4784d1b57e (patch)
tree64d400cdb10644967df183d0f202fcbf8160a773 /3rdParty/Boost/src/boost/regex
parent6f26d9aa86f0909af13b23b1a925b8d492e74154 (diff)
downloadswift-contrib-ks/boost1.47.zip
swift-contrib-ks/boost1.47.tar.bz2
Add two extra Boost dependencies, upgrade to 1.47.0ks/boost1.47
Diffstat (limited to '3rdParty/Boost/src/boost/regex')
-rw-r--r--3rdParty/Boost/src/boost/regex/config.hpp4
-rw-r--r--3rdParty/Boost/src/boost/regex/pending/object_cache.hpp2
-rw-r--r--3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp7
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp8
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp2
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/cpp_regex_traits.hpp12
-rw-r--r--3rdParty/Boost/src/boost/regex/v4/u32regex_token_iterator.hpp6
7 files changed, 30 insertions, 11 deletions
diff --git a/3rdParty/Boost/src/boost/regex/config.hpp b/3rdParty/Boost/src/boost/regex/config.hpp
index a88a785..3b92e6a 100644
--- a/3rdParty/Boost/src/boost/regex/config.hpp
+++ b/3rdParty/Boost/src/boost/regex/config.hpp
@@ -163,8 +163,10 @@
* with MSVC and the /Zc:wchar_t option we place some extra unsigned short versions
* of the non-inline functions in the library, so that users can still link to the lib,
* irrespective of whether their own code is built with /Zc:wchar_t.
+ * Note that this does NOT WORK with VC10 when the C++ locale is in effect as
+ * the locale's <unsigned short> facets simply do not compile in that case.
*/
-#if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && !defined(BOOST_RWSTD_VER)
+#if defined(__cplusplus) && (defined(BOOST_MSVC) || defined(__ICL)) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(BOOST_WINDOWS) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) && !defined(BOOST_RWSTD_VER) && ((_MSC_VER < 1600) || !defined(BOOST_REGEX_USE_CPP_LOCALE))
# define BOOST_REGEX_HAS_OTHER_WCHAR_T
# ifdef BOOST_MSVC
# pragma warning(push)
diff --git a/3rdParty/Boost/src/boost/regex/pending/object_cache.hpp b/3rdParty/Boost/src/boost/regex/pending/object_cache.hpp
index db60e28..05b6bfa 100644
--- a/3rdParty/Boost/src/boost/regex/pending/object_cache.hpp
+++ b/3rdParty/Boost/src/boost/regex/pending/object_cache.hpp
@@ -73,7 +73,7 @@ boost::shared_ptr<Object const> object_cache<Key, Object>::get(const Key& k, siz
// for now just throw, but we should never really get here...
//
::boost::throw_exception(std::runtime_error("Error in thread safety code: could not acquire a lock"));
-#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
+#if defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION) || defined(BOOST_NO_EXCEPTIONS)
return boost::shared_ptr<Object>();
#endif
#else
diff --git a/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp b/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp
index 657ca0a..a8faefd 100644
--- a/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp
+++ b/3rdParty/Boost/src/boost/regex/pending/unicode_iterator.hpp
@@ -113,6 +113,10 @@ inline unsigned utf8_trailing_byte_count(boost::uint8_t c)
return utf8_byte_count(c) - 1;
}
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4100)
+#endif
inline void invalid_utf32_code_point(::boost::uint32_t val)
{
#ifndef BOOST_NO_STD_LOCALE
@@ -124,6 +128,9 @@ inline void invalid_utf32_code_point(::boost::uint32_t val)
#endif
boost::throw_exception(e);
}
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
} // namespace detail
diff --git a/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp b/3rdParty/Boost/src/boost/regex/v4/basic_regex.hpp
index 04c7bb3..53b7bca 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
@@ -234,7 +234,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;
@@ -487,7 +487,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_parser.hpp b/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp
index 4dacfc6..0192a9f 100644
--- a/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp
+++ b/3rdParty/Boost/src/boost/regex/v4/basic_regex_parser.hpp
@@ -2711,6 +2711,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/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)
{