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/support/detail | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-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/support/detail')
10 files changed, 46 insertions, 64 deletions
diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/as_variant.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/as_variant.hpp index e2fe18d..9312042 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/as_variant.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/as_variant.hpp @@ -23,6 +23,7 @@ #include <boost/mpl/push_back.hpp> #include <boost/mpl/equal_to.hpp> #include <boost/mpl/contains.hpp> +#include <boost/mpl/limits/list.hpp> #include <boost/type_traits/is_same.hpp> namespace boost { namespace spirit { namespace detail @@ -30,6 +31,8 @@ namespace boost { namespace spirit { namespace detail template <int size> struct as_variant_impl; +#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) +#else template <> struct as_variant_impl<0> { @@ -39,6 +42,7 @@ namespace boost { namespace spirit { namespace detail typedef variant<> type; }; }; +#endif #define BOOST_FUSION_NEXT_ITERATOR(z, n, data) \ typedef typename fusion::result_of::next<BOOST_PP_CAT(I, n)>::type \ @@ -53,7 +57,13 @@ namespace boost { namespace spirit { namespace detail BOOST_PP_CAT(T, n); #define BOOST_PP_FILENAME_1 <boost/spirit/home/support/detail/as_variant.hpp> + +#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) +#define BOOST_PP_ITERATION_LIMITS (1, BOOST_MPL_LIMIT_LIST_SIZE) +#else #define BOOST_PP_ITERATION_LIMITS (1, BOOST_VARIANT_LIMIT_TYPES) +#endif + #include BOOST_PP_ITERATE() #undef BOOST_FUSION_NEXT_ITERATOR diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp index 4332fa2..f9a3ff1 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/hold_any.hpp @@ -98,7 +98,6 @@ namespace boost { namespace spirit } static void move(void* const* src, void** dest) { - reinterpret_cast<T*>(dest)->~T(); *reinterpret_cast<T*>(dest) = *reinterpret_cast<T const*>(src); } @@ -144,7 +143,6 @@ namespace boost { namespace spirit } static void move(void* const* src, void** dest) { - (*reinterpret_cast<T**>(dest))->~T(); **reinterpret_cast<T**>(dest) = **reinterpret_cast<T* const*>(src); } @@ -300,11 +298,25 @@ namespace boost { namespace spirit } // assignment operator +#ifdef BOOST_HAS_RVALUE_REFS + template <typename T> + basic_hold_any& operator=(T&& x) + { + return assign(std::forward<T>(x)); + } +#else + template <typename T> + basic_hold_any& operator=(T& x) + { + return assign(x); + } + template <typename T> basic_hold_any& operator=(T const& x) { return assign(x); } +#endif // utility functions basic_hold_any& swap(basic_hold_any& x) @@ -405,15 +417,6 @@ namespace boost { namespace spirit { typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref; -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // If 'nonref' is still reference type, it means the user has not - // specialized 'remove_reference'. - - // Please use BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION macro - // to generate specialization of remove_reference for your class - // See type traits library documentation for details - BOOST_STATIC_ASSERT(!is_reference<nonref>::value); -#endif nonref* result = any_cast<nonref>(&operand); if(!result) @@ -426,11 +429,6 @@ namespace boost { namespace spirit { typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type nonref; -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // The comment in the above version of 'any_cast' explains when this - // assert is fired and what to do. - BOOST_STATIC_ASSERT(!is_reference<nonref>::value); -#endif return any_cast<nonref const&>(const_cast<basic_hold_any<Char> &>(operand)); } diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/is_spirit_tag.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/is_spirit_tag.hpp index 73269e2..e8f9f6d 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/is_spirit_tag.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/is_spirit_tag.hpp @@ -11,10 +11,6 @@ #pragma once #endif -#ifndef BOOST_SPIRIT_USE_PHOENIX_V3 -#define BOOST_SPIRIT_IS_TAG() -#else #define BOOST_SPIRIT_IS_TAG() typedef void is_spirit_tag; -#endif #endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/debug.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/debug.hpp index 23cda87..36ee1bb 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/debug.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/debug.hpp @@ -31,11 +31,7 @@ public: const CharT *ptr_ = in_.c_str (); std::size_t size_ = in_.size (); -#if defined _MSC_VER && _MSC_VER <= 1200 - out_.erase (); -#else out_.clear (); -#endif while (size_) { diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp index 49bea2f..daa06e7 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/generator.hpp @@ -12,6 +12,7 @@ #include "partition/charset.hpp" #include "partition/equivset.hpp" #include <memory> +#include <limits> #include "parser/tree/node.hpp" #include "parser/parser.hpp" #include "containers/ptr_list.hpp" @@ -185,10 +186,10 @@ protected: while (regex_iter_ != regex_iter_end_) { // re-declare var, otherwise we perform an assignment..! - const typename rules::string ®ex_ = *regex_iter_; + const typename rules::string ®ex2_ = *regex_iter_; - root_ = parser::parse (regex_.c_str (), - regex_.c_str () + regex_.size (), *ids_iter_, + root_ = parser::parse (regex2_.c_str (), + regex2_.c_str () + regex2_.size (), *ids_iter_, *unique_ids_iter_, *states_iter_, rules_.flags (), rules_.locale (), node_ptr_vector_, macromap_, token_map_, internals_._seen_BOL_assertion, @@ -336,16 +337,16 @@ protected: equiv_end_ = equivset_->_index_vector.end (); equiv_iter_ != equiv_end_; ++equiv_iter_) { - const std::size_t index_ = *equiv_iter_; + const std::size_t equiv_index_ = *equiv_iter_; - if (index_ == bol_token) + if (equiv_index_ == bol_token) { if (ptr_[eol_index] == 0) { ptr_[bol_index] = transition_; } } - else if (index_ == eol_token) + else if (equiv_index_ == eol_token) { if (ptr_[bol_index] == 0) { @@ -354,7 +355,7 @@ protected: } else { - ptr_[index_ + dfa_offset] = transition_; + ptr_[equiv_index_ + dfa_offset] = transition_; } } } @@ -560,7 +561,12 @@ protected: if (token_._negated) { - CharT curr_char_ = sizeof (CharT) == 1 ? -128 : 0; + // $$$ FIXME JDG July 2014 $$$ + // this code is problematic on platforms where wchar_t is signed + // with min generating negative numbers. This crashes with BAD_ACCESS + // because of the vector index below: + // ptr_[static_cast<typename Traits::index_type>(curr_char_)] + CharT curr_char_ = 0; // (std::numeric_limits<CharT>::min)(); std::size_t i_ = 0; while (curr_ < chars_end_) diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/size_t.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/size_t.hpp index 349aa6d..449ff4d 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/size_t.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/size_t.hpp @@ -8,14 +8,6 @@ #include <stddef.h> // ptrdiff_t -#if defined _MSC_VER && _MSC_VER <= 1200 -namespace std -{ - using ::ptrdiff_t; - using ::size_t; -} -#else #include <string> -#endif #endif diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/state_machine.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/state_machine.hpp index e09e991..46e50c9 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/state_machine.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/state_machine.hpp @@ -29,11 +29,7 @@ public: class iterator { public: -#if defined _MSC_VER && _MSC_VER <= 1200 - friend basic_state_machine; -#else friend class basic_state_machine; -#endif struct data { @@ -225,11 +221,7 @@ public: } }; -#if defined _MSC_VER && _MSC_VER <= 1200 - friend iterator; -#else friend class iterator; -#endif basic_state_machine () { @@ -365,7 +357,7 @@ private: { const std::size_t col_ = lu_->at (alpha_index_); - if (col_ != dead_state_index) + if (col_ != static_cast<std::size_t>(dead_state_index)) { chars_[col_ - dfa_offset] += static_cast<CharT> (alpha_index_); diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/string_token.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/string_token.hpp index 6bfa6ff..dd58c98 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/string_token.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/lexer/string_token.hpp @@ -10,6 +10,7 @@ #include "size_t.hpp" #include "consts.hpp" // num_chars, num_wchar_ts #include <string> +#include <limits> namespace boost { @@ -55,11 +56,7 @@ struct basic_string_token if (_charset.length () == max_chars_) { _negated = !_negated; -#if defined _MSC_VER && _MSC_VER <= 1200 - _charset.erase (); -#else _charset.clear (); -#endif } else if (_charset.length () > max_chars_ / 2) { @@ -71,7 +68,7 @@ struct basic_string_token { const std::size_t max_chars_ = sizeof (CharT) == 1 ? num_chars : num_wchar_ts; - CharT curr_char_ = sizeof (CharT) == 1 ? -128 : 0; + CharT curr_char_ = (std::numeric_limits<CharT>::min)(); string temp_; const CharT *curr_ = _charset.c_str (); const CharT *chars_end_ = curr_ + _charset.size (); @@ -126,11 +123,7 @@ struct basic_string_token void clear () { _negated = false; -#if defined _MSC_VER && _MSC_VER <= 1200 - _charset.erase (); -#else - _charset.clear (); -#endif + _charset.clear (); } void intersect (basic_string_token &rhs_, basic_string_token &overlap_) diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/make_cons.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/make_cons.hpp index cbbb73b..0d6b0ae 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/make_cons.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/make_cons.hpp @@ -42,11 +42,10 @@ namespace boost { namespace spirit { namespace detail namespace result_of { - template <typename Car, typename Cdr = fusion::nil> + template <typename Car, typename Cdr = fusion::nil_> struct make_cons { - typedef typename as_meta_element<Car>::type car_type; - typedef typename fusion::cons<car_type, Cdr> type; + typedef typename as_meta_element<Car>::type car_type; typedef typename fusion::cons<car_type, Cdr> type; }; } diff --git a/3rdParty/Boost/src/boost/spirit/home/support/detail/scoped_enum_emulation.hpp b/3rdParty/Boost/src/boost/spirit/home/support/detail/scoped_enum_emulation.hpp index 70979a6..1b35043 100644 --- a/3rdParty/Boost/src/boost/spirit/home/support/detail/scoped_enum_emulation.hpp +++ b/3rdParty/Boost/src/boost/spirit/home/support/detail/scoped_enum_emulation.hpp @@ -17,8 +17,8 @@ #if BOOST_VERSION >= 104000 # include <boost/detail/scoped_enum_emulation.hpp> #else -# if !defined(BOOST_NO_SCOPED_ENUMS) -# define BOOST_NO_SCOPED_ENUMS +# if !defined(BOOST_NO_CXX11_SCOPED_ENUMS) +# define BOOST_NO_CXX11_SCOPED_ENUMS # endif # define BOOST_SCOPED_ENUM_START(name) struct name { enum enum_type # define BOOST_SCOPED_ENUM_END }; |