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/archive/impl | |
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/archive/impl')
13 files changed, 75 insertions, 66 deletions
diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp index 8ea39f7..b8e7f45 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp @@ -12,7 +12,7 @@ #include <algorithm> #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::memcpy; @@ -51,6 +51,8 @@ BOOST_ARCHIVE_OR_WARCHIVE_DECL(void) basic_binary_iarchive<Archive>::init(){ // read signature in an archive version independent manner std::string file_signature; + + #if 0 // commented out since it interfers with derivation try { std::size_t l; this->This()->load(l); @@ -69,6 +71,11 @@ basic_binary_iarchive<Archive>::init(){ // will cause invalid_signature archive exception to be thrown below file_signature = ""; } + #else + // https://svn.boost.org/trac/boost/ticket/7301 + * this->This() >> file_signature; + #endif + if(file_signature != BOOST_ARCHIVE_SIGNATURE()) boost::serialization::throw_exception( archive_exception(archive_exception::invalid_signature) @@ -113,10 +120,7 @@ basic_binary_iarchive<Archive>::init(){ #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) this->set_library_version(input_library_version); #else - #if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) - detail:: - #endif - basic_iarchive::set_library_version(input_library_version); + detail::basic_iarchive::set_library_version(input_library_version); #endif if(BOOST_ARCHIVE_VERSION() < input_library_version) diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp index e0f5c2e..9e2340e 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp @@ -28,6 +28,7 @@ namespace std{ #include <boost/archive/archive_exception.hpp> #include <boost/archive/codecvt_null.hpp> #include <boost/archive/add_facet.hpp> +#include <boost/archive/basic_binary_iprimitive.hpp> namespace boost { namespace archive { diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp index dec2cd7..467fd6f 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp @@ -12,7 +12,7 @@ #include <algorithm> #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::memcpy; diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp index 02b5ffa..509decb 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp @@ -31,6 +31,7 @@ namespace std{ using ::wcslen; } #include <boost/archive/add_facet.hpp> #include <boost/archive/codecvt_null.hpp> +#include <boost/archive/basic_binary_oprimitive.hpp> namespace boost { namespace archive { diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp index 0a246b7..8d364f9 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp @@ -11,7 +11,7 @@ #include <algorithm> #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::memcpy; @@ -62,10 +62,7 @@ basic_text_iarchive<Archive>::init(void){ #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) this->set_library_version(input_library_version); #else - #if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) - detail:: - #endif - basic_iarchive::set_library_version(input_library_version); + detail::basic_iarchive::set_library_version(input_library_version); #endif // extra little .t is to get around borland quirk diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp index ad6a6d5..d0da284 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp @@ -30,10 +30,10 @@ namespace std{ #include <boost/archive/iterators/binary_from_base64.hpp> #include <boost/archive/iterators/transform_width.hpp> -namespace boost { +namespace boost { namespace archive { -namespace { +namespace detail { template<class CharType> bool is_whitespace(CharType c); @@ -48,7 +48,7 @@ namespace { return 0 != std::iswspace(t); } #endif -} +} // detail // translate base64 text into binary and copy into buffer // until buffer is full. @@ -58,7 +58,7 @@ basic_text_iprimitive<IStream>::load_binary( void *address, std::size_t count ){ - typedef BOOST_DEDUCED_TYPENAME IStream::char_type CharType; + typedef typename IStream::char_type CharType; if(0 == count) return; @@ -73,7 +73,7 @@ basic_text_iprimitive<IStream>::load_binary( archive_exception(archive_exception::input_stream_error) ); // convert from base64 to binary - typedef BOOST_DEDUCED_TYPENAME + typedef typename iterators::transform_width< iterators::binary_from_base64< iterators::remove_whitespace< @@ -86,33 +86,31 @@ basic_text_iprimitive<IStream>::load_binary( ,CharType > binary; - - binary ti_begin = binary( + + binary i = binary( BOOST_MAKE_PFTO_WRAPPER( iterators::istream_iterator<CharType>(is) ) ); - + char * caddr = static_cast<char *>(address); // take care that we don't increment anymore than necessary - while(--count > 0){ - *caddr++ = static_cast<char>(*ti_begin); - ++ti_begin; + while(count-- > 0){ + *caddr++ = static_cast<char>(*i++); } - *caddr++ = static_cast<char>(*ti_begin); - - iterators::istream_iterator<CharType> i; + + // skip over any excess input for(;;){ - BOOST_DEDUCED_TYPENAME IStream::int_type r; + typename IStream::int_type r; r = is.get(); if(is.eof()) break; - if(is_whitespace(static_cast<CharType>(r))) + if(detail::is_whitespace(static_cast<CharType>(r))) break; } } - + template<class IStream> BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_iprimitive<IStream>::basic_text_iprimitive( @@ -130,7 +128,7 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive( archive_locale.reset( add_facet( std::locale::classic(), - new codecvt_null<BOOST_DEDUCED_TYPENAME IStream::char_type> + new codecvt_null<typename IStream::char_type> ) ); is.imbue(* archive_locale); diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp index 34e6995..4170c97 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp @@ -11,7 +11,7 @@ #include <boost/assert.hpp> #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::memcpy; diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp index cacab61..33ab4a8 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp @@ -9,6 +9,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <cstddef> // NULL +#include <algorithm> // std::copy #include <boost/serialization/pfto.hpp> #include <boost/archive/basic_text_oprimitive.hpp> @@ -30,7 +31,7 @@ basic_text_oprimitive<OStream>::save_binary( const void *address, std::size_t count ){ - typedef BOOST_DEDUCED_TYPENAME OStream::char_type CharType; + typedef typename OStream::char_type CharType; if(0 == count) return; @@ -51,7 +52,7 @@ basic_text_oprimitive<OStream>::save_binary( 8 > > - ,72 + ,76 ,const char // cwpro8 needs this > base64_text; @@ -90,7 +91,7 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive( archive_locale.reset( add_facet( std::locale::classic(), - new codecvt_null<BOOST_DEDUCED_TYPENAME OStream::char_type> + new codecvt_null<typename OStream::char_type> ) ); os.imbue(* archive_locale); diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp b/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp index 807ed07..66ca1f0 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp @@ -2,7 +2,7 @@ #define BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -50,11 +50,6 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> -// supress noise -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) -# pragma warning (disable : 4786) // too long name, harmless warning -#endif - #include <boost/spirit/include/classic_rule.hpp> #include <boost/spirit/include/classic_chset.hpp> diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp index c7cbc7f..dc62eed 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp @@ -98,9 +98,9 @@ xml_iarchive_impl<Archive>::load(wchar_t * ws){ const char * end = start + s.size(); while(start < end){ wchar_t wc; - int result = std::mbtowc(&wc, start, end - start); - if(0 < result){ - start += result; + int length = std::mbtowc(&wc, start, end - start); + if(0 < length){ + start += length; *ws++ = wc; continue; } diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp index 8ab954f..ab1a217 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp @@ -8,7 +8,7 @@ #include <ostream> #include <iomanip> -#include <algorithm> +#include <algorithm> // std::copy #include <string> #include <cstring> // strlen diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp index 9dde66c..a4665ad 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp @@ -1,5 +1,5 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_wiprimitive.cpp: +// xml_wiarchive_impl.ipp: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // Distributed under the Boost Software License, Version 1.0. (See @@ -8,8 +8,6 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME - #include <cstring> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -21,7 +19,7 @@ namespace std{ #ifndef BOOST_NO_STD_WSTREAMBUF #include <boost/assert.hpp> -#include <algorithm> +#include <algorithm> // std::copy #include <boost/detail/workaround.hpp> // Dinkumware and RogueWave #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) @@ -34,9 +32,16 @@ namespace std{ #include <boost/serialization/string.hpp> #include <boost/archive/add_facet.hpp> -#include <boost/archive/xml_archive_exception.hpp> -#include <boost/archive/detail/utf8_codecvt_facet.hpp> +#ifndef BOOST_NO_CXX11_HDR_CODECVT + #include <codecvt> + namespace boost { namespace archive { namespace detail { + typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet; + } } } +#else + #include <boost/archive/detail/utf8_codecvt_facet.hpp> +#endif +#include <boost/archive/xml_archive_exception.hpp> #include <boost/archive/iterators/mb_from_wchar.hpp> #include <boost/archive/basic_xml_archive.hpp> @@ -167,7 +172,7 @@ xml_wiarchive_impl<Archive>::xml_wiarchive_impl( if(0 == (flags & no_codecvt)){ archive_locale.reset( add_facet( - std::locale::classic(), + is_.getloc(), new boost::archive::detail::utf8_codecvt_facet ) ); diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp index 3bf42bd..6092a91 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp @@ -11,15 +11,14 @@ #include <ostream> #include <string> -#include <algorithm> +#include <algorithm> // std::copy #include <locale> -#include <boost/config.hpp> // msvc 6.0 needs this to suppress warnings - // for BOOST_DEDUCED_TYPENAME #include <cstring> // strlen #include <cstdlib> // mbtowc #include <cwchar> // wcslen +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::strlen; @@ -39,7 +38,14 @@ namespace std{ #include <boost/archive/iterators/dataflow_exception.hpp> #include <boost/archive/add_facet.hpp> -#include <boost/archive/detail/utf8_codecvt_facet.hpp> +#ifndef BOOST_NO_CXX11_HDR_CODECVT + #include <codecvt> + namespace boost { namespace archive { namespace detail { + typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet; + } } } +#else + #include <boost/archive/detail/utf8_codecvt_facet.hpp> +#endif namespace boost { namespace archive { @@ -128,26 +134,27 @@ xml_woarchive_impl<Archive>::xml_woarchive_impl( // a) before output is invoked or // b) after flush has been called. This prevents one-to-many // transforms (such as one to many transforms from getting - // mixed up. Unfortunately, STLPort doesn't respect b) above - // so the restoration of the original archive locale done by - // the locale_saver doesn't get processed, - // before the current one is destroyed. - // so the codecvt doesn't get replaced with the orginal - // so closing the stream invokes codecvt::do_unshift - // so it crashes because the corresponding locale that contained - // the codecvt isn't around any more. - // we can hack around this by using a static codecvt that never - // gets destroyed. + // mixed up. if(0 == (flags & no_codecvt)){ boost::archive::detail::utf8_codecvt_facet *pfacet; #if defined(__SGI_STL_PORT) - static boost::archive::detail::utf8_codecvt_facet + // Unfortunately, STLPort doesn't respect b) above + // so the restoration of the original archive locale done by + // the locale_saver doesn't get processed, + // before the current one is destroyed. + // so the codecvt doesn't get replaced with the orginal + // so closing the stream invokes codecvt::do_unshift + // so it crashes because the corresponding locale that contained + // the codecvt isn't around any more. + // we can hack around this by using a static codecvt that never + // gets destroyed. + static boost::archive::detail::utf8_codecvt_facet facet(static_cast<size_t>(1)); pfacet = & facet; #else pfacet = new boost::archive::detail::utf8_codecvt_facet; #endif - archive_locale.reset(add_facet(std::locale::classic(), pfacet)); + archive_locale.reset(add_facet(os_.getloc(), pfacet)); os.imbue(* archive_locale); } if(0 == (flags & no_header)) |