From 4fadd968fa12130524c8380f33fcfe25d4de79e5 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 13 Sep 2017 11:24:46 +0900 Subject: Imported Upstream version 1.65.0 Change-Id: Icf8400b375482cb11bcf77440a6934ba360d6ba4 Signed-off-by: DongHun Kwak --- boost/archive/basic_text_iarchive.hpp | 2 +- boost/archive/codecvt_null.hpp | 13 ++++++++----- boost/archive/detail/iserializer.hpp | 2 +- boost/archive/impl/archive_serializer_map.ipp | 4 ++++ boost/archive/impl/basic_binary_iprimitive.ipp | 4 ++-- boost/archive/impl/basic_binary_oprimitive.ipp | 2 ++ boost/archive/impl/text_wiarchive_impl.ipp | 2 +- boost/archive/impl/xml_woarchive_impl.ipp | 2 ++ boost/archive/iterators/base64_from_binary.hpp | 2 +- boost/archive/iterators/binary_from_base64.hpp | 2 +- boost/archive/iterators/escape.hpp | 3 ++- boost/archive/iterators/istream_iterator.hpp | 6 +++--- boost/archive/iterators/mb_from_wchar.hpp | 3 ++- boost/archive/iterators/transform_width.hpp | 1 + boost/archive/iterators/wchar_from_mb.hpp | 2 ++ boost/archive/wcslen.hpp | 2 ++ 16 files changed, 35 insertions(+), 17 deletions(-) (limited to 'boost/archive') diff --git a/boost/archive/basic_text_iarchive.hpp b/boost/archive/basic_text_iarchive.hpp index 583041d8b4..48a646cc1f 100644 --- a/boost/archive/basic_text_iarchive.hpp +++ b/boost/archive/basic_text_iarchive.hpp @@ -21,7 +21,7 @@ // // note the fact that on libraries without wide characters, ostream is // is not a specialization of basic_ostream which in fact is not defined -// in such cases. So we can't use basic_ostream but rather +// in such cases. So we can't use basic_istream but rather // use two template parameters #include diff --git a/boost/archive/codecvt_null.hpp b/boost/archive/codecvt_null.hpp index 9cc9e5729d..7bce2b9b32 100644 --- a/boost/archive/codecvt_null.hpp +++ b/boost/archive/codecvt_null.hpp @@ -18,8 +18,11 @@ #include #include // NULL, size_t +#ifndef BOOST_NO_CWCHAR #include // for mbstate_t +#endif #include +#include #include #include // must be the last header @@ -62,7 +65,7 @@ public: template<> class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt { - virtual BOOST_WARCHIVE_DECL std::codecvt_base::result + virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * first1, @@ -71,8 +74,8 @@ class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt : public std::codecvt : public std::codecvt(no_locale_manage) {} virtual ~codecvt_null(){}; diff --git a/boost/archive/detail/iserializer.hpp b/boost/archive/detail/iserializer.hpp index 6e02eec7c4..193e98a82e 100644 --- a/boost/archive/detail/iserializer.hpp +++ b/boost/archive/detail/iserializer.hpp @@ -605,7 +605,7 @@ template inline void load(Archive & ar, T &t){ // if this assertion trips. It means we're trying to load a // const object with a compiler that doesn't have correct - // funtion template ordering. On other compilers, this is + // function template ordering. On other compilers, this is // handled below. detail::check_const_loading< T >(); typedef diff --git a/boost/archive/impl/archive_serializer_map.ipp b/boost/archive/impl/archive_serializer_map.ipp index 8dabf0d08f..7f163ec407 100644 --- a/boost/archive/impl/archive_serializer_map.ipp +++ b/boost/archive/impl/archive_serializer_map.ipp @@ -47,6 +47,10 @@ archive_serializer_map::insert(const basic_serializer * bs){ template BOOST_ARCHIVE_OR_WARCHIVE_DECL void archive_serializer_map::erase(const basic_serializer * bs){ + BOOST_ASSERT(! boost::serialization::singleton< + extra_detail::map + >::is_destroyed() + ); if(boost::serialization::singleton< extra_detail::map >::is_destroyed()) diff --git a/boost/archive/impl/basic_binary_iprimitive.ipp b/boost/archive/impl/basic_binary_iprimitive.ipp index 7082b003e7..bbe933ccf6 100644 --- a/boost/archive/impl/basic_binary_iprimitive.ipp +++ b/boost/archive/impl/basic_binary_iprimitive.ipp @@ -84,6 +84,7 @@ basic_binary_iprimitive::init() ); } +#ifndef BOOST_NO_CWCHAR template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive::load(wchar_t * ws) @@ -93,6 +94,7 @@ basic_binary_iprimitive::load(wchar_t * ws) load_binary(ws, l * sizeof(wchar_t) / sizeof(char)); ws[l] = L'\0'; } +#endif template BOOST_ARCHIVE_OR_WARCHIVE_DECL void @@ -110,7 +112,6 @@ basic_binary_iprimitive::load(std::string & s) load_binary(&(*s.begin()), l); } -#ifndef BOOST_NO_CWCHAR template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive::load(char * s) @@ -120,7 +121,6 @@ basic_binary_iprimitive::load(char * s) load_binary(s, l); s[l] = '\0'; } -#endif #ifndef BOOST_NO_STD_WSTRING template diff --git a/boost/archive/impl/basic_binary_oprimitive.ipp b/boost/archive/impl/basic_binary_oprimitive.ipp index 130831e4fb..7b042173a4 100644 --- a/boost/archive/impl/basic_binary_oprimitive.ipp +++ b/boost/archive/impl/basic_binary_oprimitive.ipp @@ -71,6 +71,7 @@ basic_binary_oprimitive::save(const std::string &s) } #ifndef BOOST_NO_CWCHAR +#ifndef BOOST_NO_INTRINSIC_WCHAR_T template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive::save(const wchar_t * ws) @@ -91,6 +92,7 @@ basic_binary_oprimitive::save(const std::wstring &ws) save_binary(ws.data(), l * sizeof(wchar_t) / sizeof(char)); } #endif +#endif // BOOST_NO_CWCHAR template BOOST_ARCHIVE_OR_WARCHIVE_DECL diff --git a/boost/archive/impl/text_wiarchive_impl.ipp b/boost/archive/impl/text_wiarchive_impl.ipp index 12af2b9f12..e85625ac32 100644 --- a/boost/archive/impl/text_wiarchive_impl.ipp +++ b/boost/archive/impl/text_wiarchive_impl.ipp @@ -56,7 +56,7 @@ text_wiarchive_impl::load(std::string &s) s.resize(0); s.reserve(size); while(size-- > 0){ - int x = is.narrow(is.get(), '\0'); + char x = is.narrow(is.get(), '\0'); s += x; } } diff --git a/boost/archive/impl/xml_woarchive_impl.ipp b/boost/archive/impl/xml_woarchive_impl.ipp index 58f92c9d92..01b1a052d5 100644 --- a/boost/archive/impl/xml_woarchive_impl.ipp +++ b/boost/archive/impl/xml_woarchive_impl.ipp @@ -17,7 +17,9 @@ #include // strlen #include // mbtowc +#ifndef BOOST_NO_CWCHAR #include // wcslen +#endif #include #if defined(BOOST_NO_STDC_NAMESPACE) diff --git a/boost/archive/iterators/base64_from_binary.hpp b/boost/archive/iterators/base64_from_binary.hpp index 00c4e10c10..ee84994439 100644 --- a/boost/archive/iterators/base64_from_binary.hpp +++ b/boost/archive/iterators/base64_from_binary.hpp @@ -41,7 +41,7 @@ template struct from_6_bit { typedef CharType result_type; CharType operator()(CharType t) const{ - const char * lookup_table = + static const char * lookup_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789" diff --git a/boost/archive/iterators/binary_from_base64.hpp b/boost/archive/iterators/binary_from_base64.hpp index 2eb7828251..89b8f889da 100644 --- a/boost/archive/iterators/binary_from_base64.hpp +++ b/boost/archive/iterators/binary_from_base64.hpp @@ -37,7 +37,7 @@ template struct to_6_bit { typedef CharType result_type; CharType operator()(CharType t) const{ - const signed char lookup_table[] = { + static const signed char lookup_table[] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, diff --git a/boost/archive/iterators/escape.hpp b/boost/archive/iterators/escape.hpp index a1fee91420..103b31e0fe 100644 --- a/boost/archive/iterators/escape.hpp +++ b/boost/archive/iterators/escape.hpp @@ -102,7 +102,8 @@ public: super_t(base), m_bnext(NULL), m_bend(NULL), - m_full(false) + m_full(false), + m_current_value(0) { } }; diff --git a/boost/archive/iterators/istream_iterator.hpp b/boost/archive/iterators/istream_iterator.hpp index 9a1d555c10..a187f605e6 100644 --- a/boost/archive/iterators/istream_iterator.hpp +++ b/boost/archive/iterators/istream_iterator.hpp @@ -56,7 +56,7 @@ class istream_iterator : //Access the value referred to Elem dereference() const { - return m_istream->peek(); + return static_cast(m_istream->peek()); } void increment(){ @@ -75,14 +75,14 @@ public: } istream_iterator() : - m_istream(NULL) + m_istream(NULL), + m_current_value(NULL) {} istream_iterator(const istream_iterator & rhs) : m_istream(rhs.m_istream), m_current_value(rhs.m_current_value) {} - }; } // namespace iterators diff --git a/boost/archive/iterators/mb_from_wchar.hpp b/boost/archive/iterators/mb_from_wchar.hpp index b6dc9b2151..05df71c258 100644 --- a/boost/archive/iterators/mb_from_wchar.hpp +++ b/boost/archive/iterators/mb_from_wchar.hpp @@ -18,8 +18,9 @@ #include #include // size_t +#ifndef BOOST_NO_CWCHAR #include // mbstate_t - +#endif #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ diff --git a/boost/archive/iterators/transform_width.hpp b/boost/archive/iterators/transform_width.hpp index d042560e29..09c050a927 100644 --- a/boost/archive/iterators/transform_width.hpp +++ b/boost/archive/iterators/transform_width.hpp @@ -111,6 +111,7 @@ public: transform_width(T start) : super_t(Base(static_cast< T >(start))), m_buffer_out_full(false), + m_buffer_out(0), // To disable GCC warning, but not truly necessary //(m_buffer_in will be initialized later before being //used because m_remaining_bits == 0) diff --git a/boost/archive/iterators/wchar_from_mb.hpp b/boost/archive/iterators/wchar_from_mb.hpp index 52a44bdc79..2af8f6401f 100644 --- a/boost/archive/iterators/wchar_from_mb.hpp +++ b/boost/archive/iterators/wchar_from_mb.hpp @@ -19,7 +19,9 @@ #include #include #include // size_t +#ifndef BOOST_NO_CWCHAR #include // mbstate_t +#endif #include // copy #include diff --git a/boost/archive/wcslen.hpp b/boost/archive/wcslen.hpp index 2a3d6351d4..0b60004f09 100644 --- a/boost/archive/wcslen.hpp +++ b/boost/archive/wcslen.hpp @@ -44,7 +44,9 @@ inline std::size_t wcslen(const wchar_t * ws) #else +#ifndef BOOST_NO_CWCHAR #include +#endif #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::wcslen; } #endif -- cgit v1.2.3