diff options
author | robot-contrib <[email protected]> | 2022-09-06 14:48:46 +0300 |
---|---|---|
committer | robot-contrib <[email protected]> | 2022-09-06 14:48:46 +0300 |
commit | 96df1adeb1d068660b1117244bf8143e735341b3 (patch) | |
tree | 7ee6a36be498248883c5446b292f6adc058948ac /contrib/restricted/boost/serialization/src | |
parent | 494edfef2c7dd60976c0dd1f6ad4910b5d875e67 (diff) |
Update contrib/restricted/boost/serialization to 1.80.0
Diffstat (limited to 'contrib/restricted/boost/serialization/src')
17 files changed, 373 insertions, 51 deletions
diff --git a/contrib/restricted/boost/serialization/src/basic_archive.cpp b/contrib/restricted/boost/serialization/src/basic_archive.cpp index 6c3386e7a3a..a57fe31cafa 100644 --- a/contrib/restricted/boost/serialization/src/basic_archive.cpp +++ b/contrib/restricted/boost/serialization/src/basic_archive.cpp @@ -79,10 +79,15 @@ BOOST_ARCHIVE_SIGNATURE(){ // 15- corrections to optional and collection loading // 16- eliminated dependency on <codecvt> which is buggy in some libraries // and now officially deprecated in the standard +// 17- Boost 1.68 August 2018 +// 18- addressed undefined behavior in archive constuctors. +// init() called from base wrote archive header before archive +// was fully constructed. +// Boost 1.76 -BOOST_SYMBOL_VISIBLE library_version_type +BOOST_SYMBOL_VISIBLE boost::serialization::library_version_type BOOST_ARCHIVE_VERSION(){ - return library_version_type(16); + return boost::serialization::library_version_type(19); } } // namespace archive diff --git a/contrib/restricted/boost/serialization/src/basic_iarchive.cpp b/contrib/restricted/boost/serialization/src/basic_iarchive.cpp index a5455a530ab..5a8f1a9df20 100644 --- a/contrib/restricted/boost/serialization/src/basic_iarchive.cpp +++ b/contrib/restricted/boost/serialization/src/basic_iarchive.cpp @@ -257,7 +257,10 @@ basic_iarchive_impl::reset_object_address( break; } for(; i < m_moveable_objects.end; ++i){ - void const * const this_address = object_id_vector[i].address; + const aobject & ao = object_id_vector[i]; + if(ao.loaded_as_pointer) + continue; + void const * const this_address = ao.address; // calculate displacement from this level // warning - pointer arithmetic on void * is in herently non-portable // but expected to work on all platforms in current usage @@ -424,7 +427,7 @@ basic_iarchive_impl::load_pointer( class_id_type cid; load(ar, cid); - if(NULL_POINTER_TAG == cid){ + if(BOOST_SERIALIZATION_NULL_POINTER_TAG == cid){ t = NULL; return bpis_ptr; } @@ -497,7 +500,6 @@ basic_iarchive_impl::load_pointer( serialization::state_saver<object_id_type> w_end(m_moveable_objects.end); - // add to list of serialized objects so that we can properly handle // cyclic strucures object_id_vector.push_back(aobject(t, cid)); @@ -584,7 +586,7 @@ basic_iarchive::delete_created_pointers() pimpl->delete_created_pointers(); } -BOOST_ARCHIVE_DECL boost::archive::library_version_type +BOOST_ARCHIVE_DECL boost::serialization::library_version_type basic_iarchive::get_library_version() const{ return pimpl->m_archive_library_version; } diff --git a/contrib/restricted/boost/serialization/src/basic_oarchive.cpp b/contrib/restricted/boost/serialization/src/basic_oarchive.cpp index 653260c33b3..695bdf7bcfc 100644 --- a/contrib/restricted/boost/serialization/src/basic_oarchive.cpp +++ b/contrib/restricted/boost/serialization/src/basic_oarchive.cpp @@ -134,7 +134,7 @@ class basic_oarchive_impl { // keyed on object id std::set<object_id_type> stored_pointers; - // address of the most recent object serialized as a poiner + // address of the most recent object serialized as a pointer // whose data itself is now pending serialization const void * pending_object; const basic_oserializer * pending_bos; @@ -179,28 +179,28 @@ basic_oarchive_impl::find(const serialization::extended_type_info & ti) const { class bosarg : public basic_oserializer { - bool class_info() const { + bool class_info() const BOOST_OVERRIDE { BOOST_ASSERT(false); return false; } // returns true if objects should be tracked - bool tracking(const unsigned int) const { + bool tracking(const unsigned int) const BOOST_OVERRIDE { BOOST_ASSERT(false); return false; } // returns class version - version_type version() const { + version_type version() const BOOST_OVERRIDE { BOOST_ASSERT(false); return version_type(0); } // returns true if this class is polymorphic - bool is_polymorphic() const{ + bool is_polymorphic() const BOOST_OVERRIDE { BOOST_ASSERT(false); return false; } void save_object_data( basic_oarchive & /*ar*/, const void * /*x*/ - ) const { + ) const BOOST_OVERRIDE { BOOST_ASSERT(false); } public: @@ -306,10 +306,9 @@ basic_oarchive_impl::save_object( // just save the object id ar.vsave(object_reference_type(oid)); ar.end_preamble(); - return; } -// save a pointer to an object instance +// colle inline void basic_oarchive_impl::save_pointer( basic_oarchive & ar, diff --git a/contrib/restricted/boost/serialization/src/codecvt_null.cpp b/contrib/restricted/boost/serialization/src/codecvt_null.cpp index 624afc21618..2011e77b587 100644 --- a/contrib/restricted/boost/serialization/src/codecvt_null.cpp +++ b/contrib/restricted/boost/serialization/src/codecvt_null.cpp @@ -18,7 +18,7 @@ namespace boost { namespace archive { -std::codecvt_base::result +BOOST_SYMBOL_EXPORT std::codecvt_base::result codecvt_null<wchar_t>::do_out( std::mbstate_t & /*state*/, const wchar_t * first1, @@ -46,7 +46,7 @@ codecvt_null<wchar_t>::do_out( return std::codecvt_base::ok; } -std::codecvt_base::result +BOOST_SYMBOL_EXPORT std::codecvt_base::result codecvt_null<wchar_t>::do_in( std::mbstate_t & /*state*/, const char * first1, @@ -80,5 +80,12 @@ codecvt_null<wchar_t>::do_in( return std::codecvt_base::ok; } +BOOST_SYMBOL_EXPORT codecvt_null<wchar_t>::codecvt_null(std::size_t no_locale_manage) : + std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage) +{} + +BOOST_SYMBOL_EXPORT codecvt_null<wchar_t>::~codecvt_null() +{} + } // namespace archive } // namespace boost diff --git a/contrib/restricted/boost/serialization/src/extended_type_info.cpp b/contrib/restricted/boost/serialization/src/extended_type_info.cpp index 364fe56d842..f86a4a2c947 100644 --- a/contrib/restricted/boost/serialization/src/extended_type_info.cpp +++ b/contrib/restricted/boost/serialization/src/extended_type_info.cpp @@ -79,24 +79,24 @@ typedef std::multiset<const extended_type_info *, key_compare> ktmap; class extended_type_info_arg : public extended_type_info { - virtual bool - is_less_than(const extended_type_info & /*rhs*/) const { + bool + is_less_than(const extended_type_info & /*rhs*/) const BOOST_OVERRIDE { BOOST_ASSERT(false); return false; - }; - virtual bool - is_equal(const extended_type_info & /*rhs*/) const { + } + bool + is_equal(const extended_type_info & /*rhs*/) const BOOST_OVERRIDE { BOOST_ASSERT(false); return false; - }; - virtual const char * get_debug_info() const { + } + const char * get_debug_info() const BOOST_OVERRIDE { return get_key(); } - virtual void * construct(unsigned int /*count*/, ...) const{ + void * construct(unsigned int /*count*/, ...) const BOOST_OVERRIDE { BOOST_ASSERT(false); return NULL; } - virtual void destroy(void const * const /*p*/) const { + void destroy(void const * const /*p*/) const BOOST_OVERRIDE { BOOST_ASSERT(false); } public: @@ -104,8 +104,7 @@ public: extended_type_info(0, key) {} - ~extended_type_info_arg(){ - } + ~extended_type_info_arg() BOOST_OVERRIDE {} }; #ifdef BOOST_MSVC @@ -125,7 +124,10 @@ BOOST_SERIALIZATION_DECL void extended_type_info::key_unregister() const{ if(NULL == get_key()) return; - BOOST_ASSERT(! singleton<detail::ktmap>::is_destroyed()); + // note: it's been discovered that at least one platform is not guaranteed + // to destroy singletons reverse order of construction. So we can't + // use a runtime assert here. Leave this in a reminder not to do this! + // BOOST_ASSERT(! singleton<detail::ktmap>::is_destroyed()); if(! singleton<detail::ktmap>::is_destroyed()){ detail::ktmap & x = singleton<detail::ktmap>::get_mutable_instance(); detail::ktmap::iterator start = x.lower_bound(this); diff --git a/contrib/restricted/boost/serialization/src/extended_type_info_typeid.cpp b/contrib/restricted/boost/serialization/src/extended_type_info_typeid.cpp index 7413d2e3a40..f0fc5554cb4 100644 --- a/contrib/restricted/boost/serialization/src/extended_type_info_typeid.cpp +++ b/contrib/restricted/boost/serialization/src/extended_type_info_typeid.cpp @@ -10,11 +10,11 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <algorithm> +#include <cstddef> // NULL #include <set> -#include <boost/assert.hpp> #include <typeinfo> -#include <cstddef> // NULL +#include <boost/assert.hpp> #include <boost/core/no_exceptions_support.hpp> // it marks our code with proper attributes as being exported when @@ -95,18 +95,22 @@ BOOST_SERIALIZATION_DECL void extended_type_info_typeid_0::type_unregister() { if(NULL != m_ti){ - BOOST_ASSERT(! singleton<tkmap>::is_destroyed()); + // note: previously this conditional was a runtime assertion with + // BOOST_ASSERT. We've changed it because we've discovered that at + // least one platform is not guaranteed to destroy singletons in + // reverse order of distruction. + // BOOST_ASSERT(! singleton<tkmap>::is_destroyed()); if(! singleton<tkmap>::is_destroyed()){ tkmap & x = singleton<tkmap>::get_mutable_instance(); // remove all entries in map which corresponds to this type // make sure that we don't use any invalidated iterators - for(;;){ + while(true){ const tkmap::iterator & it = x.find(this); if(it == x.end()) break; x.erase(it); - }; + } } } m_ti = NULL; @@ -121,23 +125,23 @@ extended_type_info_typeid_0::type_unregister() class extended_type_info_typeid_arg : public extended_type_info_typeid_0 { - virtual void * construct(unsigned int /*count*/, ...) const{ + void * construct(unsigned int /*count*/, ...) const BOOST_OVERRIDE { BOOST_ASSERT(false); return NULL; } - virtual void destroy(void const * const /*p*/) const { + void destroy(void const * const /*p*/) const BOOST_OVERRIDE { BOOST_ASSERT(false); } public: extended_type_info_typeid_arg(const std::type_info & ti) : extended_type_info_typeid_0(NULL) { - // note absense of self register and key as this is used only as + // note absence of self register and key as this is used only as // search argument given a type_info reference and is not to // be added to the map. m_ti = & ti; } - ~extended_type_info_typeid_arg(){ + ~extended_type_info_typeid_arg() BOOST_OVERRIDE { m_ti = NULL; } }; diff --git a/contrib/restricted/boost/serialization/src/polymorphic_binary_iarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_binary_iarchive.cpp new file mode 100644 index 00000000000..7fcca705a88 --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_binary_iarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_iarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_binary_iarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map<polymorphic_binary_iarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_binary_oarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_binary_oarchive.cpp new file mode 100644 index 00000000000..8b66c5cb53f --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_binary_oarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_oarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_binary_oarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map<polymorphic_binary_oarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_text_iarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_text_iarchive.cpp new file mode 100644 index 00000000000..6404ec83b80 --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_text_iarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_iarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_text_iarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map<polymorphic_text_iarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_text_oarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_text_oarchive.cpp new file mode 100644 index 00000000000..4160a621a8e --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_text_oarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_oarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_text_oarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map<polymorphic_text_oarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_text_wiarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_text_wiarchive.cpp new file mode 100644 index 00000000000..2089195a378 --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_text_wiarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_wiarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_text_wiarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map<polymorphic_text_wiarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_text_woarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_text_woarchive.cpp new file mode 100644 index 00000000000..514f1447785 --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_text_woarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_woarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_text_woarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map<polymorphic_text_woarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_xml_iarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_xml_iarchive.cpp new file mode 100644 index 00000000000..17ec7917dcf --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_xml_iarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_iarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_xml_iarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map<polymorphic_xml_iarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_xml_oarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_xml_oarchive.cpp new file mode 100644 index 00000000000..124f899f926 --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_xml_oarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_oarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_xml_oarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map<polymorphic_xml_oarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_xml_wiarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_xml_wiarchive.cpp new file mode 100644 index 00000000000..1548c9ed94e --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_xml_wiarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_wiarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_xml_wiarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class archive_serializer_map<polymorphic_xml_wiarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/polymorphic_xml_woarchive.cpp b/contrib/restricted/boost/serialization/src/polymorphic_xml_woarchive.cpp new file mode 100644 index 00000000000..4798945665b --- /dev/null +++ b/contrib/restricted/boost/serialization/src/polymorphic_xml_woarchive.cpp @@ -0,0 +1,30 @@ +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_woarchive.cpp: + +// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com . +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#if (defined _MSC_VER) && (_MSC_VER == 1200) +# pragma warning (disable : 4786) // too long name, harmless warning +#endif + +#define BOOST_ARCHIVE_SOURCE +#include <boost/serialization/config.hpp> +#include <boost/archive/polymorphic_xml_woarchive.hpp> + +// explicitly instantiate for this type of text stream +#include <boost/archive/impl/archive_serializer_map.ipp> + +namespace boost { +namespace archive { +namespace detail { + +template class detail::archive_serializer_map<polymorphic_xml_woarchive>; + +} // detail +} // archive +} // boost diff --git a/contrib/restricted/boost/serialization/src/void_cast.cpp b/contrib/restricted/boost/serialization/src/void_cast.cpp index 405130306c8..261e4bcc949 100644 --- a/contrib/restricted/boost/serialization/src/void_cast.cpp +++ b/contrib/restricted/boost/serialization/src/void_cast.cpp @@ -43,7 +43,7 @@ namespace void_cast_detail { // member extended type info records - NOT their // addresses. This is necessary in order for the // void cast operations to work across dll and exe -// module boundries. +// module boundaries. bool void_caster::operator<(const void_caster & rhs) const { // include short cut to save time and eliminate // problems when when base class aren't virtual @@ -87,14 +87,14 @@ class void_caster_shortcut : public void_caster vbc_downcast( void const * const t ) const; - virtual void const * - upcast(void const * const t) const{ + void const * + upcast(void const * const t) const BOOST_OVERRIDE { if(m_includes_virtual_base) return vbc_upcast(t); return static_cast<const char *> ( t ) - m_difference; } - virtual void const * - downcast(void const * const t) const{ + void const * + downcast(void const * const t) const BOOST_OVERRIDE { if(m_includes_virtual_base) return vbc_downcast(t); return static_cast<const char *> ( t ) + m_difference; @@ -102,7 +102,7 @@ class void_caster_shortcut : public void_caster virtual bool is_shortcut() const { return true; } - virtual bool has_virtual_base() const { + bool has_virtual_base() const BOOST_OVERRIDE { return m_includes_virtual_base; } public: @@ -118,7 +118,7 @@ public: { recursive_register(includes_virtual_base); } - virtual ~void_caster_shortcut(){ + ~void_caster_shortcut() BOOST_OVERRIDE { recursive_unregister(); } }; @@ -187,17 +187,17 @@ void_caster_shortcut::vbc_upcast( // just used as a search key class void_caster_argument : public void_caster { - virtual void const * - upcast(void const * const /*t*/) const { + void const * + upcast(void const * const /*t*/) const BOOST_OVERRIDE { BOOST_ASSERT(false); return NULL; } - virtual void const * - downcast( void const * const /*t*/) const { + void const * + downcast( void const * const /*t*/) const BOOST_OVERRIDE { BOOST_ASSERT(false); return NULL; } - virtual bool has_virtual_base() const { + bool has_virtual_base() const BOOST_OVERRIDE { BOOST_ASSERT(false); return false; } @@ -208,7 +208,7 @@ public: ) : void_caster(derived, base) {} - virtual ~void_caster_argument(){}; + ~void_caster_argument() BOOST_OVERRIDE {} }; #ifdef BOOST_MSVC @@ -276,7 +276,10 @@ void_caster::recursive_register(bool includes_virtual_base) const { BOOST_SERIALIZATION_DECL void void_caster::recursive_unregister() const { - BOOST_ASSERT(! void_caster_registry::is_destroyed()); + // note: it's been discovered that at least one platform is not guaranteed + // to destroy singletons reverse order of construction. So we can't + // use a runtime assert here. Leave this in a reminder not to do this! + // BOOST_ASSERT(! void_caster_registry::is_destroyed()); if(void_caster_registry::is_destroyed()) return; |