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/spirit/home/classic | |
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/spirit/home/classic')
5 files changed, 5 insertions, 373 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/classic/core/composite/impl/directives.ipp b/3rdParty/Boost/src/boost/spirit/home/classic/core/composite/impl/directives.ipp index b25b25f..96b2dd7 100644 --- a/3rdParty/Boost/src/boost/spirit/home/classic/core/composite/impl/directives.ipp +++ b/3rdParty/Boost/src/boost/spirit/home/classic/core/composite/impl/directives.ipp @@ -151,169 +151,6 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN return s.parse(scan); } -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - - /////////////////////////////////////////////////////////////////////// - // - // from spirit 1.1 (copyright (c) 2001 Bruce Florman) - // various workarounds to support longest and shortest directives - // - /////////////////////////////////////////////////////////////////////// - template <typename T> - struct is_alternative - { - // Determine at compile time (without partial specialization) - // whether a given type is an instance of the alternative<A,B> - - static T t(); - template <typename A, typename B> - static char test_(alternative<A, B> const&); // no implementation - static int test_(...); // no implementation - enum { r = sizeof(char) == sizeof(test_(t())) }; - typedef mpl::bool_<r> value; - }; - - template <typename T> struct select_to_longest; - - template <typename T> - struct to_longest_alternative - { - typedef typename select_to_longest<T>::result_t result_t; - typedef typename select_to_longest<T>::plain_t plain_t; - typedef typename select_to_longest<T>::choose_t choose_t; - static result_t convert(T const& a); - }; - - template <typename T> - struct to_longest_generic - { - typedef T const& result_t; - typedef T plain_t; - typedef mpl::false_ choose_t; - }; - - template <typename T> - inline T const& - to_longest_convert(T const& a, mpl::false_) - { return a; } - - template <typename T> - struct to_longest_recursive - { - typedef typename to_longest_alternative< - typename T::left_t>::plain_t a_t; - typedef typename to_longest_alternative< - typename T::right_t>::plain_t b_t; - - typedef longest_alternative<a_t, b_t> result_t; - - typedef result_t plain_t; - typedef mpl::true_ choose_t; - }; - - template <typename A, typename B> - inline typename to_longest_alternative<alternative<A, B> >::result_t - to_longest_convert(alternative<A, B> const& alt, mpl::true_) - { - typedef typename to_longest_alternative< - alternative<A, B> >::result_t result_t; - return result_t( - to_longest_alternative<A>::convert(alt.left()), - to_longest_alternative<B>::convert(alt.right())); - } - - template <typename T> - inline typename to_longest_alternative<T>::result_t - to_longest_alternative<T>::convert(T const& a) - { - return to_longest_convert( - a, to_longest_alternative<T>::choose_t()); - } - - template <typename T> - struct select_to_longest - { - typedef typename mpl::if_< - is_alternative<T> // IF - , to_longest_recursive<T> // THEN - , to_longest_generic<T> // ELSE - >::type type; - - typedef typename select_to_longest::type::result_t result_t; - typedef typename select_to_longest::type::plain_t plain_t; - typedef typename select_to_longest::type::choose_t choose_t; - }; - - template <typename T> struct select_to_shortest; - - template <typename T> - struct to_shortest_alternative - { - typedef typename select_to_shortest<T>::result_t result_t; - typedef typename select_to_shortest<T>::plain_t plain_t; - typedef typename select_to_shortest<T>::choose_t choose_t; - static result_t convert(T const& a); - }; - - template <typename T> - struct to_shortest_generic - { - typedef T const& result_t; - typedef T plain_t; - typedef mpl::false_ choose_t; - }; - - template <typename T> - inline T const& - to_shortest_convert(T const& a, mpl::false_) { return a; } - - template <typename T> - struct to_shortest_recursive - { - typedef typename to_shortest_alternative< - typename T::left_t>::plain_t a_t; - typedef typename to_shortest_alternative< - typename T::right_t>::plain_t b_t; - - typedef shortest_alternative<a_t, b_t> result_t; - - typedef result_t plain_t; - typedef mpl::true_ choose_t; - }; - - template <typename A, typename B> - inline typename to_shortest_alternative<alternative<A, B> >::result_t - to_shortest_convert(alternative<A, B> const& alt, mpl::true_) - { - typedef typename to_shortest_alternative< - alternative<A, B> >::result_t result_t; - return result_t( - to_shortest_alternative<A>::convert(alt.left()), - to_shortest_alternative<B>::convert(alt.right())); - } - - template <typename T> - inline typename to_shortest_alternative<T>::result_t - to_shortest_alternative<T>::convert(T const& a) - { - return to_shortest_convert( - a, to_shortest_alternative<T>::choose_t()); - } - - template <typename T> - struct select_to_shortest - { - typedef typename mpl::if_< - is_alternative<T> // IF - , to_shortest_recursive<T> // THEN - , to_shortest_generic<T> // ELSE - >::type type; - - typedef typename select_to_shortest::type::result_t result_t; - typedef typename select_to_shortest::type::plain_t plain_t; - typedef typename select_to_shortest::type::choose_t choose_t; - }; -#else template <typename T> struct to_longest_alternative { @@ -363,7 +200,6 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN to_shortest_alternative<B>::convert(alt.right())); } }; -#endif } BOOST_SPIRIT_CLASSIC_NAMESPACE_END diff --git a/3rdParty/Boost/src/boost/spirit/home/classic/core/non_terminal/rule.hpp b/3rdParty/Boost/src/boost/spirit/home/classic/core/non_terminal/rule.hpp index e905689..1d4336b 100644 --- a/3rdParty/Boost/src/boost/spirit/home/classic/core/non_terminal/rule.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/classic/core/non_terminal/rule.hpp @@ -15,7 +15,7 @@ // Spirit predefined maximum number of simultaneously usable different // scanner types. // -// This limit defines the maximum number of of possible different scanner +// This limit defines the maximum number of possible different scanner // types for which a specific rule<> may be used. If this isn't defined, a // rule<> may be used with one scanner type only (multiple scanner support // is disabled). diff --git a/3rdParty/Boost/src/boost/spirit/home/classic/core/primitives/impl/primitives.ipp b/3rdParty/Boost/src/boost/spirit/home/classic/core/primitives/impl/primitives.ipp index 152e5b1..8a52251 100644 --- a/3rdParty/Boost/src/boost/spirit/home/classic/core/primitives/impl/primitives.ipp +++ b/3rdParty/Boost/src/boost/spirit/home/classic/core/primitives/impl/primitives.ipp @@ -10,21 +10,12 @@ #if !defined(BOOST_SPIRIT_PRIMITIVES_IPP) #define BOOST_SPIRIT_PRIMITIVES_IPP -// This should eventually go to a config file. -#if defined(__GNUC__) && (__GNUC__ < 3) && !defined(_STLPORT_VERSION) -# ifndef BOOST_SPIRIT_NO_CHAR_TRAITS -# define BOOST_SPIRIT_NO_CHAR_TRAITS -# endif -#endif - #include <cctype> #if !defined(BOOST_NO_CWCTYPE) #include <cwctype> #endif -#ifndef BOOST_SPIRIT_NO_CHAR_TRAITS -# include <string> // char_traits -#endif +#include <string> // char_traits #if defined(BOOST_MSVC) # pragma warning (push) @@ -79,80 +70,6 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN // /////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_SPIRIT_NO_CHAR_TRAITS -# define BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE std -#else - - template <typename CharT> - struct char_traits - { - typedef CharT int_type; - typedef CharT char_type; - }; - - template<> - struct char_traits<char> - { - typedef int int_type; - typedef char char_type; - - static char_type - to_char_type(int_type c) - { - return static_cast<char_type>(c); - } - - static int - to_int_type(char c) - { - return static_cast<unsigned char>(c); - } - }; - - template<> - struct char_traits<unsigned char> - { - typedef int int_type; - typedef unsigned char char_type; - - static char_type - to_char_type(int_type c) - { - return static_cast<char_type>(c); - } - - static int - to_int_type(unsigned char c) - { - return c; - } - }; - -# define BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE impl -# ifndef BOOST_NO_CWCTYPE - - template<> - struct char_traits<wchar_t> - { - typedef wint_t int_type; - typedef wchar_t char_type; - - static char_type - to_char_type(int_type c) - { - return static_cast<char_type>(c); - } - - static wint_t - to_int_type(wchar_t c) - { - return c; - } - }; - -# endif -#endif // BOOST_SPIRIT_NO_CHAR_TRAITS - // Use char_traits for char and wchar_t only, as these are the only // specializations provided in the standard. Other types are on their // own. @@ -182,19 +99,16 @@ BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN struct char_type_char_traits_helper { typedef CharT char_type; - typedef typename BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE - ::char_traits<CharT>::int_type int_type; + typedef typename std::char_traits<CharT>::int_type int_type; static int_type to_int_type(CharT c) { - return BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE - ::char_traits<CharT>::to_int_type(c); + return std::char_traits<CharT>::to_int_type(c); } static char_type to_char_type(int_type i) { - return BOOST_SPIRIT_CHAR_TRAITS_NAMESPACE - ::char_traits<CharT>::to_char_type(i); + return std::char_traits<CharT>::to_char_type(i); } }; diff --git a/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset.ipp b/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset.ipp index 3017035..6e2130b 100644 --- a/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset.ipp +++ b/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset.ipp @@ -71,38 +71,6 @@ namespace utility { namespace impl { } } - ////////////////////////////////// - -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - - template <typename CharT, typename FakeT> - void chset_negated_set(boost::shared_ptr<basic_chset<CharT> > &ptr, chlit<CharT> const &ch, - FakeT) - { - if(ch.ch != (std::numeric_limits<CharT>::min)()) { - ptr->set((std::numeric_limits<CharT>::min)(), ch.ch - 1); - } - if(ch.ch != (std::numeric_limits<CharT>::max)()) { - ptr->set(ch.ch + 1, (std::numeric_limits<CharT>::max)()); - } - } - - template <typename CharT, typename FakeT> - void chset_negated_set(boost::shared_ptr<basic_chset<CharT> > &ptr, - spirit::range<CharT> const &rng, FakeT) - { - if(rng.first != (std::numeric_limits<CharT>::min)()) { - ptr->set((std::numeric_limits<CharT>::min)(), rng.first - 1); - } - if(rng.last != (std::numeric_limits<CharT>::max)()) { - ptr->set(rng.last + 1, (std::numeric_limits<CharT>::max)()); - } - } - -#endif // BOOST_WORKAROUND(BOOST_MSVC, < 1300) - -////////////////////////////////// - }} // namespace utility::impl template <typename CharT> @@ -142,8 +110,6 @@ inline chset<CharT>::chset(range<CharT> const& arg_) : ptr(new basic_chset<CharT>()) { ptr->set(arg_.first, arg_.last); } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <typename CharT> inline chset<CharT>::chset(negated_char_parser<chlit<CharT> > const& arg_) : ptr(new basic_chset<CharT>()) @@ -158,8 +124,6 @@ inline chset<CharT>::chset(negated_char_parser<range<CharT> > const& arg_) set(arg_); } -#endif // !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <typename CharT> inline chset<CharT>::~chset() {} @@ -218,8 +182,6 @@ chset<CharT>::operator=(range<CharT> const& rhs) return *this; } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <typename CharT> inline chset<CharT>& chset<CharT>::operator=(negated_char_parser<chlit<CharT> > const& rhs) @@ -238,8 +200,6 @@ chset<CharT>::operator=(negated_char_parser<range<CharT> > const& rhs) return *this; } -#endif // !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <typename CharT> inline void chset<CharT>::set(range<CharT> const& arg_) @@ -248,8 +208,6 @@ chset<CharT>::set(range<CharT> const& arg_) ptr->set(arg_.first, arg_.last); } -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <typename CharT> inline void chset<CharT>::set(negated_char_parser<chlit<CharT> > const& arg_) @@ -278,8 +236,6 @@ chset<CharT>::set(negated_char_parser<range<CharT> > const& arg_) } } -#endif // !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - template <typename CharT> inline void chset<CharT>::clear(range<CharT> const& arg_) diff --git a/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset_operators.ipp b/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset_operators.ipp index 4319c9b..842a679 100644 --- a/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset_operators.ipp +++ b/3rdParty/Boost/src/boost/spirit/home/classic/utility/impl/chset_operators.ipp @@ -285,78 +285,6 @@ operator^(chlit<CharT> const& a, chset<CharT> const& b) return chset<CharT>(a.ch) ^ b; } -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - -/////////////////////////////////////////////////////////////////////////////// -// -// negated_char_parser <--> chset free operators implementation -// -/////////////////////////////////////////////////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator|(chset<CharT> const& a, negated_char_parser<ParserT> const& b) -{ - return a | chset<CharT>(b); -} - -////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator&(chset<CharT> const& a, negated_char_parser<ParserT> const& b) -{ - return a & chset<CharT>(b); -} - -////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator-(chset<CharT> const& a, negated_char_parser<ParserT> const& b) -{ - return a - chset<CharT>(b); -} - -////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator^(chset<CharT> const& a, negated_char_parser<ParserT> const& b) -{ - return a ^ chset<CharT>(b); -} - -////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator|(negated_char_parser<ParserT> const& a, chset<CharT> const& b) -{ - return chset<CharT>(a) | b; -} - -////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator&(negated_char_parser<ParserT> const& a, chset<CharT> const& b) -{ - return chset<CharT>(a) & b; -} - -////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator-(negated_char_parser<ParserT> const& a, chset<CharT> const& b) -{ - return chset<CharT>(a) - b; -} - -////////////////////////////////// -template <typename CharT, typename ParserT> -inline chset<CharT> -operator^(negated_char_parser<ParserT> const& a, chset<CharT> const& b) -{ - return chset<CharT>(a) ^ b; -} - -#else // BOOST_WORKAROUND(BOOST_MSVC, < 1300) - /////////////////////////////////////////////////////////////////////////////// // // negated_char_parser<range> <--> chset free operators implementation @@ -493,8 +421,6 @@ operator^(negated_char_parser<chlit<CharT> > const& a, chset<CharT> const& b) return chset<CharT>(a) ^ b; } -#endif // BOOST_WORKAROUND(BOOST_MSVC, < 1300) - /////////////////////////////////////////////////////////////////////////////// // // anychar_parser <--> chset free operators |