summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-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/xml_woarchive_impl.ipp')
-rw-r--r--3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp39
1 files changed, 23 insertions, 16 deletions
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))