diff options
author | robot-contrib <robot-contrib@yandex-team.com> | 2022-09-06 14:48:46 +0300 |
---|---|---|
committer | robot-contrib <robot-contrib@yandex-team.com> | 2022-09-06 14:48:46 +0300 |
commit | 96df1adeb1d068660b1117244bf8143e735341b3 (patch) | |
tree | 7ee6a36be498248883c5446b292f6adc058948ac /contrib | |
parent | 494edfef2c7dd60976c0dd1f6ad4910b5d875e67 (diff) | |
download | ydb-96df1adeb1d068660b1117244bf8143e735341b3.tar.gz |
Update contrib/restricted/boost/serialization to 1.80.0
Diffstat (limited to 'contrib')
154 files changed, 2746 insertions, 1192 deletions
diff --git a/contrib/restricted/boost/core/include/boost/core/nvp.hpp b/contrib/restricted/boost/core/include/boost/core/nvp.hpp new file mode 100644 index 0000000000..8826a5929e --- /dev/null +++ b/contrib/restricted/boost/core/include/boost/core/nvp.hpp @@ -0,0 +1,57 @@ +/* +Copyright 2019 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_NVP_HPP +#define BOOST_CORE_NVP_HPP + +#include <boost/core/addressof.hpp> +#include <boost/config.hpp> + +namespace boost { +namespace serialization { + +template<class T> +class nvp { +public: + nvp(const char* n, T& v) BOOST_NOEXCEPT + : n_(n) + , v_(boost::addressof(v)) { } + + const char* name() const BOOST_NOEXCEPT { + return n_; + } + + T& value() const BOOST_NOEXCEPT { + return *v_; + } + + const T& const_value() const BOOST_NOEXCEPT { + return *v_; + } + +private: + const char* n_; + T* v_; +}; + +template<class T> +inline const nvp<T> +make_nvp(const char* n, T& v) BOOST_NOEXCEPT +{ + return nvp<T>(n, v); +} + +} /* serialization */ + +using serialization::nvp; +using serialization::make_nvp; + +} /* boost */ + +#define BOOST_NVP(v) boost::make_nvp(BOOST_STRINGIZE(v), v) + +#endif diff --git a/contrib/restricted/boost/core/include/boost/core/uncaught_exceptions.hpp b/contrib/restricted/boost/core/include/boost/core/uncaught_exceptions.hpp new file mode 100644 index 0000000000..380e81cd03 --- /dev/null +++ b/contrib/restricted/boost/core/include/boost/core/uncaught_exceptions.hpp @@ -0,0 +1,155 @@ +/* + * Copyright Andrey Semashev 2018 - 2020. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * https://www.boost.org/LICENSE_1_0.txt) + */ +/*! + * \file uncaught_exceptions.hpp + * \author Andrey Semashev + * \date 2018-11-10 + * + * \brief This header provides an `uncaught_exceptions` function implementation, which was introduced in C++17. + * + * The code in this file is based on the implementation by Evgeny Panasyuk: + * + * https://github.com/panaseleus/stack_unwinding/blob/master/boost/exception/uncaught_exception_count.hpp + */ + +#ifndef BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_ +#define BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_ + +#include <exception> +#include <boost/config.hpp> + +#if defined(BOOST_HAS_PRAGMA_ONCE) +#pragma once +#endif + +#if (defined(__cpp_lib_uncaught_exceptions) && __cpp_lib_uncaught_exceptions >= 201411) +#if defined(__APPLE__) +#include <Availability.h> +// Apple systems only support std::uncaught_exceptions starting with specific versions: +// - Mac OS >= 10.12 +// - iOS >= 10.0 +// - tvOS >= 10.0 +// - watchOS >= 3.0 +// https://github.com/boostorg/core/issues/80 +#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || \ + (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000) +#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#endif +#else +#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#endif // defined(__APPLE__) +// Visual Studio 14.0 supports N4152 std::uncaught_exceptions() but doesn't define __cpp_lib_uncaught_exceptions +#elif (defined(_MSC_VER) && _MSC_VER >= 1900) +#define BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#endif + +#if !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) + +// cxxabi.h availability macro +#if defined(__has_include) && (!defined(BOOST_GCC) || (__GNUC__ >= 5)) +# if __has_include(<cxxabi.h>) +# define BOOST_CORE_HAS_CXXABI_H +# endif +#elif defined(__GLIBCXX__) || defined(__GLIBCPP__) +# define BOOST_CORE_HAS_CXXABI_H +#endif + +#if defined(BOOST_CORE_HAS_CXXABI_H) +// MinGW GCC 4.4 seem to not work the same way the newer GCC versions do. As a result, __cxa_get_globals based implementation will always return 0. +// Just disable it for now and fall back to std::uncaught_exception(). +// On AIX, xlclang++ does have cxxabi.h but doesn't have __cxa_get_globals (https://github.com/boostorg/core/issues/78). +#if !( \ + (defined(__MINGW32__) && (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 405)) || \ + defined(__ibmxl__) \ + ) +#include <cxxabi.h> +#include <cstring> +#define BOOST_CORE_HAS_CXA_GET_GLOBALS +// At least on MinGW and Linux, only GCC since 4.7 declares __cxa_get_globals() in cxxabi.h. Older versions of GCC do not expose this function but it's there. +// On OpenBSD, it seems, the declaration is also missing. +// Note that at least on FreeBSD 11, cxxabi.h declares __cxa_get_globals with a different exception specification, so we can't declare the function unconditionally. +// On Linux with clang and libc++ and on OS X, there is a version of cxxabi.h from libc++abi that doesn't declare __cxa_get_globals, but provides __cxa_uncaught_exceptions. +// The function only appeared in version _LIBCPPABI_VERSION >= 1002 of the library. Unfortunately, there are linking errors about undefined reference to __cxa_uncaught_exceptions +// on Ubuntu Trusty and OS X, so we avoid using it and forward-declare __cxa_get_globals instead. +// On QNX SDP 7.0 (QCC 5.4.0), there are multiple cxxabi.h, one from glibcxx from gcc and another from libc++abi from LLVM. Which one is included will be determined by the qcc +// command line arguments (-V and/or -Y; http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.utilities/topic/q/qcc.html). The LLVM libc++abi is missing the declaration +// of __cxa_get_globals but it is also patched by QNX developers to not define _LIBCPPABI_VERSION. Older QNX SDP versions, up to and including 6.6, don't provide LLVM and libc++abi. +// See https://github.com/boostorg/core/issues/59. +#if !defined(__FreeBSD__) && \ + ( \ + (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 407) || \ + defined(__OpenBSD__) || \ + (defined(__QNXNTO__) && !defined(__GLIBCXX__) && !defined(__GLIBCPP__)) || \ + defined(_LIBCPPABI_VERSION) \ + ) +namespace __cxxabiv1 { +struct __cxa_eh_globals; +#if defined(__OpenBSD__) +extern "C" __cxa_eh_globals* __cxa_get_globals(); +#else +extern "C" __cxa_eh_globals* __cxa_get_globals() BOOST_NOEXCEPT_OR_NOTHROW __attribute__((__const__)); +#endif +} // namespace __cxxabiv1 +#endif +#endif +#endif // defined(BOOST_CORE_HAS_CXXABI_H) + +#if defined(_MSC_VER) && _MSC_VER >= 1400 +#include <cstring> +#define BOOST_CORE_HAS_GETPTD +namespace boost { +namespace core { +namespace detail { +extern "C" void* _getptd(); +} // namespace detail +} // namespace core +} // namespace boost +#endif // defined(_MSC_VER) && _MSC_VER >= 1400 + +#endif // !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) + +#if !defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) && !defined(BOOST_CORE_HAS_CXA_GET_GLOBALS) && !defined(BOOST_CORE_HAS_GETPTD) +//! This macro is defined when `uncaught_exceptions` is not guaranteed to return values greater than 1 if multiple exceptions are pending +#define BOOST_CORE_UNCAUGHT_EXCEPTIONS_EMULATED +#endif + +namespace boost { + +namespace core { + +//! Returns the number of currently pending exceptions +inline unsigned int uncaught_exceptions() BOOST_NOEXCEPT +{ +#if defined(BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS) + // C++17 implementation + return static_cast< unsigned int >(std::uncaught_exceptions()); +#elif defined(BOOST_CORE_HAS_CXA_GET_GLOBALS) + // Tested on {clang 3.2,GCC 3.5.6,GCC 4.1.2,GCC 4.4.6,GCC 4.4.7}x{x32,x64} + unsigned int count; + std::memcpy(&count, reinterpret_cast< const unsigned char* >(::abi::__cxa_get_globals()) + sizeof(void*), sizeof(count)); // __cxa_eh_globals::uncaughtExceptions, x32 offset - 0x4, x64 - 0x8 + return count; +#elif defined(BOOST_CORE_HAS_GETPTD) + // MSVC specific. Tested on {MSVC2005SP1,MSVC2008SP1,MSVC2010SP1,MSVC2012}x{x32,x64}. + unsigned int count; + std::memcpy(&count, static_cast< const unsigned char* >(boost::core::detail::_getptd()) + (sizeof(void*) == 8u ? 0x100 : 0x90), sizeof(count)); // _tiddata::_ProcessingThrow, x32 offset - 0x90, x64 - 0x100 + return count; +#else + // Portable C++03 implementation. Does not allow to detect multiple nested exceptions. + return static_cast< unsigned int >(std::uncaught_exception()); +#endif +} + +} // namespace core + +} // namespace boost + +#undef BOOST_CORE_HAS_CXXABI_H +#undef BOOST_CORE_HAS_CXA_GET_GLOBALS +#undef BOOST_CORE_HAS_UNCAUGHT_EXCEPTIONS +#undef BOOST_CORE_HAS_GETPTD + +#endif // BOOST_CORE_UNCAUGHT_EXCEPTIONS_HPP_INCLUDED_ diff --git a/contrib/restricted/boost/serialization/CMakeLists.txt b/contrib/restricted/boost/serialization/CMakeLists.txt index 95bae972c5..2f331f669d 100644 --- a/contrib/restricted/boost/serialization/CMakeLists.txt +++ b/contrib/restricted/boost/serialization/CMakeLists.txt @@ -61,8 +61,18 @@ target_sources(restricted-boost-serialization PRIVATE ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/extended_type_info.cpp ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/extended_type_info_no_rtti.cpp ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/extended_type_info_typeid.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_binary_iarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_binary_oarchive.cpp ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_iarchive.cpp ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_oarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_text_iarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_text_oarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_text_wiarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_text_woarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_xml_iarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_xml_oarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_xml_wiarchive.cpp + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/polymorphic_xml_woarchive.cpp ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/stl_port.cpp ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/text_iarchive.cpp ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/serialization/src/text_oarchive.cpp diff --git a/contrib/restricted/boost/serialization/include/boost/archive/archive_exception.hpp b/contrib/restricted/boost/serialization/include/boost/archive/archive_exception.hpp index fabcdb5fa7..dd9181c3c1 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/archive_exception.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/archive_exception.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // archive/archive_exception.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -20,16 +20,16 @@ #include <boost/assert.hpp> #include <string> -#include <boost/config.hpp> +#include <boost/config.hpp> #include <boost/archive/detail/decl.hpp> // note: the only reason this is in here is that windows header // includes #define exception_code _exception_code (arrrgghhhh!). // the most expedient way to address this is be sure that this // header is always included whenever this header file is included. -#if defined(BOOST_WINDOWS) -#include <excpt.h> -#endif +#if defined(BOOST_WINDOWS) +#include <excpt.h> +#endif #include <boost/archive/detail/abi_prefix.hpp> // must be the last header @@ -39,7 +39,7 @@ namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by archives // -class BOOST_SYMBOL_VISIBLE archive_exception : +class BOOST_SYMBOL_VISIBLE archive_exception : public virtual std::exception { private: @@ -52,7 +52,7 @@ protected: public: typedef enum { no_exception, // initialized without code - other_exception, // any excepton not listed below + other_exception, // any exception not listed below unregistered_class, // attempt to serialize a pointer of // an unregistered class invalid_signature, // first line of archive does not contain @@ -61,9 +61,9 @@ public: // subsequent to this one pointer_conflict, // an attempt has been made to directly // serialize an object which has - // already been serialized through a pointer. - // Were this permitted, the archive load would result - // in the creation of an extra copy of the obect. + // already been serialized through a pointer. + // Were this permitted, the archive load would result + // in the creation of an extra copy of the object. incompatible_native_format, // attempt to read native binary format // on incompatible platform array_size_too_short,// array being loaded doesn't fit in array allocated @@ -71,9 +71,9 @@ public: invalid_class_name, // class name greater than the maximum permitted. // most likely a corrupted archive or an attempt // to insert virus via buffer overrun method. - unregistered_cast, // base - derived relationship not registered with + unregistered_cast, // base - derived relationship not registered with // void_cast_register - unsupported_class_version, // type saved with a version # greater than the + unsupported_class_version, // type saved with a version # greater than the // one used by the program. This indicates that the program // needs to be rebuilt. multiple_code_instantiation, // code for implementing serialization for some @@ -83,13 +83,13 @@ public: exception_code code; BOOST_ARCHIVE_DECL archive_exception( - exception_code c, + exception_code c, const char * e1 = NULL, const char * e2 = NULL ) BOOST_NOEXCEPT; - BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT ; - virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; - virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ; + BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT; + BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE; + BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE; }; }// namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_archive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_archive.hpp index 9283974ff1..381a127506 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_archive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_archive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_archive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -18,9 +18,9 @@ #include <cstring> // count #include <boost/assert.hpp> #include <boost/config.hpp> -#include <boost/cstdint.hpp> // size_t -#include <boost/noncopyable.hpp> #include <boost/integer_traits.hpp> +#include <boost/noncopyable.hpp> +#include <boost/serialization/library_version_type.hpp> #include <boost/archive/detail/auto_link_archive.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header @@ -33,76 +33,43 @@ namespace archive { #pragma warning( disable : 4244 4267 ) #endif -/* NOTE : Warning : Warning : Warning : Warning : Warning - * Don't ever changes this. If you do, they previously created - * binary archives won't be readable !!! - */ -class library_version_type { -private: - typedef uint_least16_t base_type; - base_type t; -public: - library_version_type(): t(0) {}; - explicit library_version_type(const unsigned int & t_) : t(t_){ - BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max); - } - library_version_type(const library_version_type & t_) : - t(t_.t) - {} - library_version_type & operator=(const library_version_type & rhs){ - t = rhs.t; - return *this; - } - // used for text output - operator base_type () const { - return t; - } - // used for text input - operator base_type & (){ - return t; - } - bool operator==(const library_version_type & rhs) const { - return t == rhs.t; - } - bool operator<(const library_version_type & rhs) const { - return t < rhs.t; - } -}; - -BOOST_ARCHIVE_DECL library_version_type +BOOST_ARCHIVE_DECL boost::serialization::library_version_type BOOST_ARCHIVE_VERSION(); +// create alias in boost::archive for older user code. +typedef boost::serialization::library_version_type library_version_type; + class version_type { private: typedef uint_least32_t base_type; base_type t; public: // should be private - but MPI fails if it's not!!! - version_type(): t(0) {}; + version_type(): t(0) {} explicit version_type(const unsigned int & t_) : t(t_){ BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max); } - version_type(const version_type & t_) : + version_type(const version_type & t_) : t(t_.t) {} version_type & operator=(const version_type & rhs){ - t = rhs.t; + t = rhs.t; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text intput operator base_type & (){ return t; - } + } bool operator==(const version_type & rhs) const { return t == rhs.t; - } + } bool operator<(const version_type & rhs) const { return t < rhs.t; - } + } }; class class_id_type { @@ -111,73 +78,73 @@ private: base_type t; public: // should be private - but then can't use BOOST_STRONG_TYPE below - class_id_type() : t(0) {}; + class_id_type() : t(0) {} explicit class_id_type(const int t_) : t(t_){ BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max); } explicit class_id_type(const std::size_t t_) : t(t_){ // BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max); } - class_id_type(const class_id_type & t_) : + class_id_type(const class_id_type & t_) : t(t_.t) {} class_id_type & operator=(const class_id_type & rhs){ - t = rhs.t; + t = rhs.t; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text input operator base_type &() { return t; - } + } bool operator==(const class_id_type & rhs) const { return t == rhs.t; - } + } bool operator<(const class_id_type & rhs) const { return t < rhs.t; - } + } }; -#define NULL_POINTER_TAG boost::archive::class_id_type(-1) +#define BOOST_SERIALIZATION_NULL_POINTER_TAG boost::archive::class_id_type(-1) class object_id_type { private: typedef uint_least32_t base_type; base_type t; public: - object_id_type(): t(0) {}; + object_id_type(): t(0) {} // note: presumes that size_t >= unsigned int. // use explicit cast to silence useless warning explicit object_id_type(const std::size_t & t_) : t(static_cast<base_type>(t_)){ - // make quadriple sure that we haven't lost any real integer + // make quadruple sure that we haven't lost any real integer // precision BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max); } - object_id_type(const object_id_type & t_) : + object_id_type(const object_id_type & t_) : t(t_.t) {} object_id_type & operator=(const object_id_type & rhs){ - t = rhs.t; + t = rhs.t; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text input operator base_type & () { return t; - } + } bool operator==(const object_id_type & rhs) const { return t == rhs.t; - } + } bool operator<(const object_id_type & rhs) const { return t < rhs.t; - } + } }; #if defined(_MSC_VER) @@ -188,16 +155,16 @@ struct tracking_type { bool t; explicit tracking_type(const bool t_ = false) : t(t_) - {}; + {} tracking_type(const tracking_type & t_) : t(t_.t) {} operator bool () const { return t; - }; + } operator bool & () { return t; - }; + } tracking_type & operator=(const bool t_){ t = t_; return *this; @@ -214,8 +181,8 @@ struct tracking_type { } }; -struct class_name_type : - private boost::noncopyable +struct class_name_type : + private boost::noncopyable { char *t; operator const char * & () const { @@ -227,9 +194,9 @@ struct class_name_type : std::size_t size() const { return std::strlen(t); } - explicit class_name_type(const char *key_) + explicit class_name_type(const char *key_) : t(const_cast<char *>(key_)){} - explicit class_name_type(char *key_) + explicit class_name_type(char *key_) : t(key_){} class_name_type & operator=(const class_name_type & rhs){ t = rhs.t; @@ -249,7 +216,7 @@ BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_SIGNATURE(); /* NOTE : Warning : Warning : Warning : Warning : Warning - * If any of these are changed to different sized types, + * If any of these are changed to different sized types, * binary_iarchive won't be able to read older archives * unless you rev the library version and include conditional * code based on the library version. There is nothing @@ -279,7 +246,7 @@ BOOST_ARCHIVE_STRONG_TYPEDEF(object_id_type, object_reference_type) // set implementation level to primitive for all types // used internally by the serialization library -BOOST_CLASS_IMPLEMENTATION(boost::archive::library_version_type, primitive_type) +BOOST_CLASS_IMPLEMENTATION(boost::serialization::library_version_type, primitive_type) BOOST_CLASS_IMPLEMENTATION(boost::archive::version_type, primitive_type) BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_type, primitive_type) BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_reference_type, primitive_type) @@ -291,10 +258,10 @@ BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type) #include <boost/serialization/is_bitwise_serializable.hpp> -// set types used internally by the serialization library +// set types used internally by the serialization library // to be bitwise serializable -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::library_version_type) +BOOST_IS_BITWISE_SERIALIZABLE(boost::serialization::library_version_type) BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::version_type) BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type) BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iarchive.hpp index c0cc655c99..2ec90ce08d 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iarchive.hpp @@ -16,7 +16,7 @@ // IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE // ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -30,6 +30,7 @@ #include <boost/archive/detail/common_iarchive.hpp> #include <boost/serialization/collection_size_type.hpp> #include <boost/serialization/string.hpp> +#include <boost/serialization/library_version_type.hpp> #include <boost/serialization/item_version_type.hpp> #include <boost/integer_traits.hpp> @@ -40,7 +41,7 @@ #include <boost/archive/detail/abi_prefix.hpp> // must be the last header -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -50,7 +51,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class basic_binary_iarchive - read serialized objects from a input binary stream template<class Archive> -class BOOST_SYMBOL_VISIBLE basic_binary_iarchive : +class BOOST_SYMBOL_VISIBLE basic_binary_iarchive : public detail::common_iarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -66,7 +67,7 @@ protected: #endif #endif // intermediate level to support override of operators - // fot templates in the absence of partial function + // fot templates in the absence of partial function // template ordering. If we get here pass to base class // note extra nonsense to sneak it pass the borland compiers typedef detail::common_iarchive<Archive> detail_common_iarchive; @@ -84,12 +85,12 @@ protected: BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); - // binary files don't include the optional information + // binary files don't include the optional information void load_override(class_id_optional_type & /* t */){} void load_override(tracking_type & t, int /*version*/){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(6) < lvt){ + boost::serialization::library_version_type lv = this->get_library_version(); + if(boost::serialization::library_version_type(6) < lv){ int_least8_t x=0; * this->This() >> x; t = boost::archive::tracking_type(x); @@ -101,18 +102,30 @@ protected: } } void load_override(class_id_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + boost::serialization::library_version_type lv = this->get_library_version(); + /* + * library versions: + * boost 1.39 -> 5 + * boost 1.43 -> 7 + * boost 1.47 -> 9 + * + * + * 1) in boost 1.43 and inferior, class_id_type is always a 16bit value, with no check on the library version + * --> this means all archives with version v <= 7 are written with a 16bit class_id_type + * 2) in boost 1.44 this load_override has disappeared (and thus boost 1.44 is not backward compatible at all !!) + * 3) recent boosts reintroduced load_override with a test on the version : + * - v > 7 : this->detail_common_iarchive::load_override(t, version) + * - v > 6 : 16bit + * - other : 32bit + * --> which is obviously incorrect, see point 1 + * + * the fix here decodes class_id_type on 16bit for all v <= 7, which seems to be the correct behaviour ... + */ + if(boost::serialization::library_version_type (7) < lv){ this->detail_common_iarchive::load_override(t); } - else - if(boost::archive::library_version_type(6) < lvt){ - int_least16_t x=0; - * this->This() >> x; - t = boost::archive::class_id_type(x); - } else{ - int x=0; + int_least16_t x=0; * this->This() >> x; t = boost::archive::class_id_type(x); } @@ -122,24 +135,24 @@ protected: } void load_override(version_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + boost::serialization::library_version_type lv = this->get_library_version(); + if(boost::serialization::library_version_type(7) < lv){ this->detail_common_iarchive::load_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lv){ uint_least8_t x=0; * this->This() >> x; t = boost::archive::version_type(x); } else - if(boost::archive::library_version_type(5) < lvt){ + if(boost::serialization::library_version_type(5) < lv){ uint_least16_t x=0; * this->This() >> x; t = boost::archive::version_type(x); } else - if(boost::archive::library_version_type(2) < lvt){ + if(boost::serialization::library_version_type(2) < lv){ // upto 255 versions unsigned char x=0; * this->This() >> x; @@ -153,13 +166,13 @@ protected: } void load_override(boost::serialization::item_version_type & t){ - library_version_type lvt = this->get_library_version(); -// if(boost::archive::library_version_type(7) < lvt){ - if(boost::archive::library_version_type(6) < lvt){ + boost::serialization::library_version_type lv = this->get_library_version(); +// if(boost::serialization::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(6) < lv){ this->detail_common_iarchive::load_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lv){ uint_least16_t x=0; * this->This() >> x; t = boost::serialization::item_version_type(x); @@ -172,21 +185,21 @@ protected: } void load_override(serialization::collection_size_type & t){ - if(boost::archive::library_version_type(5) < this->get_library_version()){ + if(boost::serialization::library_version_type(5) < this->get_library_version()){ this->detail_common_iarchive::load_override(t); } else{ unsigned int x=0; * this->This() >> x; t = serialization::collection_size_type(x); - } + } } BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(class_name_type & t); BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - + basic_binary_iarchive(unsigned int flags) : detail::common_iarchive<Archive>(flags) {} diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iprimitive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iprimitive.hpp index 665d3e81e1..a290240727 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iprimitive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_iprimitive.hpp @@ -20,7 +20,7 @@ // IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE // ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -37,8 +37,8 @@ #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; +namespace std{ + using ::memcpy; using ::size_t; } // namespace std #endif @@ -48,7 +48,6 @@ namespace std{ #include <boost/integer.hpp> #include <boost/integer_traits.hpp> -//#include <boost/mpl/placeholders.hpp> #include <boost/serialization/is_bitwise_serializable.hpp> #include <boost/serialization/array_wrapper.hpp> @@ -58,7 +57,7 @@ namespace std{ #include <boost/archive/detail/auto_link_archive.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header -namespace boost { +namespace boost { namespace archive { ///////////////////////////////////////////////////////////////////////////// @@ -98,8 +97,8 @@ public: ///////////////////////////////////////////////////////// // fundamental types that need special treatment - - // trap usage of invalid uninitialized boolean + + // trap usage of invalid uninitialized boolean void load(bool & t){ load_binary(& t, sizeof(t)); int i = t; @@ -119,29 +118,29 @@ public: BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_iprimitive( - std::basic_streambuf<Elem, Tr> & sb, + std::basic_streambuf<Elem, Tr> & sb, bool no_codecvt ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_binary_iprimitive(); public: // we provide an optimized load for all fundamental types - // typedef serialization::is_bitwise_serializable<mpl::_1> + // typedef serialization::is_bitwise_serializable<mpl::_1> // use_array_optimization; - struct use_array_optimization { - template <class T> - #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) - struct apply { - typedef typename boost::serialization::is_bitwise_serializable< T >::type type; + struct use_array_optimization { + template <class T> + #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) + struct apply { + typedef typename boost::serialization::is_bitwise_serializable< T >::type type; }; #else - struct apply : public boost::serialization::is_bitwise_serializable< T > {}; + struct apply : public boost::serialization::is_bitwise_serializable< T > {}; #endif }; - // the optimized load_array dispatches to load_binary + // the optimized load_array dispatches to load_binary template <class ValueType> void load_array(serialization::array_wrapper<ValueType>& a, unsigned int) { @@ -155,17 +154,17 @@ public: template<class Archive, class Elem, class Tr> inline void basic_binary_iprimitive<Archive, Elem, Tr>::load_binary( - void *address, + void *address, std::size_t count ){ // note: an optimizer should eliminate the following for char files BOOST_ASSERT( - static_cast<std::streamsize>(count / sizeof(Elem)) + static_cast<std::streamsize>(count / sizeof(Elem)) <= boost::integer_traits<std::streamsize>::const_max ); std::streamsize s = static_cast<std::streamsize>(count / sizeof(Elem)); std::streamsize scount = m_sb.sgetn( - static_cast<Elem *>(address), + static_cast<Elem *>(address), s ); if(scount != s) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oarchive.hpp index f05f2f86d5..61bd8faac0 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_binary_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -58,7 +58,7 @@ namespace detail { // does have the virtue of buiding the smalles archive in the minimum amount // of time. So under some circumstances it may be he right choice. template<class Archive> -class BOOST_SYMBOL_VISIBLE basic_binary_oarchive : +class BOOST_SYMBOL_VISIBLE basic_binary_oarchive : public detail::common_oarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -90,18 +90,18 @@ protected: BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); - // binary files don't include the optional information + // binary files don't include the optional information void save_override(const class_id_optional_type & /* t */){} // enable this if we decide to support generation of previous versions #if 0 void save_override(const boost::archive::version_type & t){ library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(7) < lvt){ this->detail_common_oarchive::save_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lvt){ const boost::uint_least16_t x = t; * this->This() << x; } @@ -112,11 +112,11 @@ protected: } void save_override(const boost::serialization::item_version_type & t){ library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(7) < lvt){ this->detail_common_oarchive::save_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lvt){ const boost::uint_least16_t x = t; * this->This() << x; } @@ -128,11 +128,11 @@ protected: void save_override(class_id_type & t){ library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ + if(boost::serialization::library_version_type(7) < lvt){ this->detail_common_oarchive::save_override(t); } else - if(boost::archive::library_version_type(6) < lvt){ + if(boost::serialization::library_version_type(6) < lvt){ const boost::int_least16_t x = t; * this->This() << x; } @@ -155,11 +155,11 @@ protected: #if 0 void save_override(const serialization::collection_size_type & t){ - if (get_library_version() < boost::archive::library_version_type(6)){ + if (get_library_version() < boost::serialization::library_version_type(6)){ unsigned int x=0; * this->This() >> x; t = serialization::collection_size_type(x); - } + } else{ * this->This() >> t; } diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oprimitive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oprimitive.hpp index 6dc770c60e..6c5e8e5e96 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oprimitive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_binary_oprimitive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_binary_oprimitive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -32,8 +32,8 @@ #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -43,7 +43,6 @@ namespace std{ #include <boost/scoped_ptr.hpp> #include <boost/serialization/throw_exception.hpp> -//#include <boost/mpl/placeholders.hpp> #include <boost/serialization/is_bitwise_serializable.hpp> #include <boost/serialization/array_wrapper.hpp> @@ -93,7 +92,7 @@ public: ///////////////////////////////////////////////////////// // fundamental types that need special treatment - + // trap usage of invalid uninitialized boolean which would // otherwise crash on load. void save(const bool t){ @@ -113,32 +112,32 @@ public: BOOST_ARCHIVE_OR_WARCHIVE_DECL void init(); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL + + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_binary_oprimitive( - std::basic_streambuf<Elem, Tr> & sb, + std::basic_streambuf<Elem, Tr> & sb, bool no_codecvt ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_binary_oprimitive(); public: // we provide an optimized save for all fundamental types - // typedef serialization::is_bitwise_serializable<mpl::_1> + // typedef serialization::is_bitwise_serializable<mpl::_1> // use_array_optimization; // workaround without using mpl lambdas struct use_array_optimization { - template <class T> - #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) - struct apply { - typedef typename boost::serialization::is_bitwise_serializable< T >::type type; + template <class T> + #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) + struct apply { + typedef typename boost::serialization::is_bitwise_serializable< T >::type type; }; #else - struct apply : public boost::serialization::is_bitwise_serializable< T > {}; + struct apply : public boost::serialization::is_bitwise_serializable< T > {}; #endif }; - // the optimized save_array dispatches to save_binary + // the optimized save_array dispatches to save_binary template <class ValueType> void save_array(boost::serialization::array_wrapper<ValueType> const& a, unsigned int) { @@ -149,9 +148,9 @@ public: }; template<class Archive, class Elem, class Tr> -inline void +inline void basic_binary_oprimitive<Archive, Elem, Tr>::save_binary( - const void *address, + const void *address, std::size_t count ){ // BOOST_ASSERT(count <= std::size_t(boost::integer_traits<std::streamsize>::const_max)); @@ -166,7 +165,7 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary( // figure number of elements to output - round up count = ( count + sizeof(Elem) - 1) / sizeof(Elem); std::streamsize scount = m_sb.sputn( - static_cast<const Elem *>(address), + static_cast<const Elem *>(address), static_cast<std::streamsize>(count) ); if(count != static_cast<std::size_t>(scount)) @@ -174,14 +173,14 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary( archive_exception(archive_exception::output_stream_error) ); //os.write( - // static_cast<const typename OStream::char_type *>(address), + // static_cast<const typename OStream::char_type *>(address), // count //); //BOOST_ASSERT(os.good()); } -} //namespace boost -} //namespace archive +} //namespace boost +} //namespace archive #include <boost/archive/detail/abi_suffix.hpp> // pop pragmas diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iarchive.hpp index 48a646cc1f..d58540d889 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -46,7 +46,7 @@ namespace detail { ///////////////////////////////////////////////////////////////////////// // class basic_text_iarchive - read serialized objects from a input text stream template<class Archive> -class BOOST_SYMBOL_VISIBLE basic_text_iarchive : +class BOOST_SYMBOL_VISIBLE basic_text_iarchive : public detail::common_iarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -54,7 +54,7 @@ public: #else protected: #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro + // for some inexplicable reason insertion of "class" generates compile error // on msvc 7.1 friend detail::interface_iarchive<Archive>; #else @@ -62,26 +62,26 @@ protected: #endif #endif // intermediate level to support override of operators - // fot templates in the absence of partial function + // fot templates in the absence of partial function // template ordering typedef detail::common_iarchive<Archive> detail_common_iarchive; template<class T> void load_override(T & t){ this->detail_common_iarchive::load_override(t); } - // text file don't include the optional information + // text file don't include the optional information void load_override(class_id_optional_type & /*t*/){} BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(class_name_type & t); BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(void); + init(); - basic_text_iarchive(unsigned int flags) : + basic_text_iarchive(unsigned int flags) : detail::common_iarchive<Archive>(flags) {} - ~basic_text_iarchive(){} + ~basic_text_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iprimitive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iprimitive.hpp index bf936b5554..606f59f580 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iprimitive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_iprimitive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_iprimitive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -29,8 +29,8 @@ #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) using ::locale; #endif @@ -121,9 +121,9 @@ protected: t = i; } #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_iprimitive(IStream &is, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_text_iprimitive(); public: BOOST_ARCHIVE_OR_WARCHIVE_DECL void diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oarchive.hpp index 6f7f8fb167..37ce33d73d 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -44,9 +44,9 @@ namespace detail { } // namespace detail ///////////////////////////////////////////////////////////////////////// -// class basic_text_oarchive +// class basic_text_oarchive template<class Archive> -class BOOST_SYMBOL_VISIBLE basic_text_oarchive : +class BOOST_SYMBOL_VISIBLE basic_text_oarchive : public detail::common_oarchive<Archive> { #ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS @@ -89,7 +89,7 @@ protected: this->detail_common_oarchive::save_override(t); } - // text file don't include the optional information + // text file don't include the optional information void save_override(const class_id_optional_type & /* t */){} void save_override(const class_name_type & t){ @@ -104,7 +104,7 @@ protected: detail::common_oarchive<Archive>(flags), delimiter(none) {} - ~basic_text_oarchive(){} + ~basic_text_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oprimitive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oprimitive.hpp index 047019b13e..58905389dd 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oprimitive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_text_oprimitive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_text_oprimitive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -38,7 +38,7 @@ #endif #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ using ::size_t; #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) using ::locale; @@ -142,22 +142,23 @@ protected: template<class T> struct is_float { - typedef typename mpl::bool_< - boost::is_floating_point<T>::value + typedef typename mpl::bool_< + boost::is_floating_point<T>::value || (std::numeric_limits<T>::is_specialized && !std::numeric_limits<T>::is_integer && !std::numeric_limits<T>::is_exact - && std::numeric_limits<T>::max_exponent) + && std::numeric_limits<T>::max_exponent) >::type type; }; template<class T> void save_impl(const T &t, boost::mpl::bool_<true> &){ // must be a user mistake - can't serialize un-initialized data - if(os.fail()) + if(os.fail()){ boost::serialization::throw_exception( archive_exception(archive_exception::output_stream_error) ); + } // The formulae for the number of decimla digits required is given in // http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf // which is derived from Kahan's paper: @@ -181,7 +182,7 @@ protected: BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_oprimitive(OStream & os, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL + BOOST_ARCHIVE_OR_WARCHIVE_DECL ~basic_text_oprimitive(); public: // unformatted append of one character @@ -197,12 +198,12 @@ public: while('\0' != *s) os.put(*s++); } - BOOST_ARCHIVE_OR_WARCHIVE_DECL void + BOOST_ARCHIVE_OR_WARCHIVE_DECL void save_binary(const void *address, std::size_t count); }; -} //namespace boost -} //namespace archive +} //namespace boost +} //namespace archive #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_archive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_archive.hpp index bef368b973..546610fa08 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_archive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_archive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_xml_archive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -21,40 +21,40 @@ #include <boost/archive/detail/auto_link_archive.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header -namespace boost { +namespace boost { namespace archive { // constant strings used in xml i/o -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_OBJECT_ID(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_OBJECT_REFERENCE(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_ID(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_CLASS_NAME(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_TRACKING(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_VERSION(); -extern +extern BOOST_ARCHIVE_DECL const char * BOOST_ARCHIVE_XML_SIGNATURE(); diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_iarchive.hpp index e9f7482f74..84c1532f62 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_iarchive.hpp @@ -104,7 +104,7 @@ protected: BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_iarchive(unsigned int flags); BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_xml_iarchive(); + ~basic_xml_iarchive() BOOST_OVERRIDE; }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_oarchive.hpp index 107fca4ec6..b2b19cade3 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/basic_xml_oarchive.hpp @@ -123,7 +123,7 @@ protected: BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_xml_oarchive(unsigned int flags); BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_xml_oarchive(); + ~basic_xml_oarchive() BOOST_OVERRIDE; }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive.hpp index 785ce7610b..5052631a38 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -33,8 +33,8 @@ namespace archive { // preserve correct static polymorphism. class BOOST_SYMBOL_VISIBLE binary_iarchive : public binary_iarchive_impl< - boost::archive::binary_iarchive, - std::istream::char_type, + boost::archive::binary_iarchive, + std::istream::char_type, std::istream::traits_type >{ public: @@ -42,12 +42,16 @@ public: binary_iarchive_impl< binary_iarchive, std::istream::char_type, std::istream::traits_type >(is, flags) - {} + { + init(flags); + } binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : binary_iarchive_impl< binary_iarchive, std::istream::char_type, std::istream::traits_type >(bsb, flags) - {} + { + init(flags); + } }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive_impl.hpp b/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive_impl.hpp index b4747c98ec..8e97ad12be 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive_impl.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/binary_iarchive_impl.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_iarchive_impl.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -25,7 +25,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -33,7 +33,7 @@ namespace detail { } // namespace detail template<class Archive, class Elem, class Tr> -class BOOST_SYMBOL_VISIBLE binary_iarchive_impl : +class BOOST_SYMBOL_VISIBLE binary_iarchive_impl : public basic_binary_iprimitive<Archive, Elem, Tr>, public basic_binary_iarchive<Archive> { @@ -70,29 +70,25 @@ protected: #endif } binary_iarchive_impl( - std::basic_streambuf<Elem, Tr> & bsb, + std::basic_streambuf<Elem, Tr> & bsb, unsigned int flags ) : basic_binary_iprimitive<Archive, Elem, Tr>( - bsb, + bsb, 0 != (flags & no_codecvt) ), basic_binary_iarchive<Archive>(flags) - { - init(flags); - } + {} binary_iarchive_impl( - std::basic_istream<Elem, Tr> & is, + std::basic_istream<Elem, Tr> & is, unsigned int flags ) : basic_binary_iprimitive<Archive, Elem, Tr>( - * is.rdbuf(), + * is.rdbuf(), 0 != (flags & no_codecvt) ), basic_binary_iarchive<Archive>(flags) - { - init(flags); - } + {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive.hpp index e8313fd7c9..ba775d5c6b 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -26,13 +26,13 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE binary_oarchive : +class BOOST_SYMBOL_VISIBLE binary_oarchive : public binary_oarchive_impl< binary_oarchive, std::ostream::char_type, std::ostream::traits_type > @@ -42,12 +42,16 @@ public: binary_oarchive_impl< binary_oarchive, std::ostream::char_type, std::ostream::traits_type >(os, flags) - {} + { + init(flags); + } binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) : binary_oarchive_impl< binary_oarchive, std::ostream::char_type, std::ostream::traits_type >(bsb, flags) - {} + { + init(flags); + } }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive_impl.hpp b/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive_impl.hpp index 6b4d018a56..d83871122f 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive_impl.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/binary_oarchive_impl.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_oarchive_impl.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -26,7 +26,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -34,7 +34,7 @@ namespace detail { } // namespace detail template<class Archive, class Elem, class Tr> -class BOOST_SYMBOL_VISIBLE binary_oarchive_impl : +class BOOST_SYMBOL_VISIBLE binary_oarchive_impl : public basic_binary_oprimitive<Archive, Elem, Tr>, public basic_binary_oarchive<Archive> { @@ -71,29 +71,25 @@ protected: #endif } binary_oarchive_impl( - std::basic_streambuf<Elem, Tr> & bsb, + std::basic_streambuf<Elem, Tr> & bsb, unsigned int flags ) : basic_binary_oprimitive<Archive, Elem, Tr>( - bsb, + bsb, 0 != (flags & no_codecvt) ), basic_binary_oarchive<Archive>(flags) - { - init(flags); - } + {} binary_oarchive_impl( - std::basic_ostream<Elem, Tr> & os, + std::basic_ostream<Elem, Tr> & os, unsigned int flags ) : basic_binary_oprimitive<Archive, Elem, Tr>( - * os.rdbuf(), + * os.rdbuf(), 0 != (flags & no_codecvt) ), basic_binary_oarchive<Archive>(flags) - { - init(flags); - } + {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/binary_wiarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/binary_wiarchive.hpp index 775d8f8272..45a2af56f8 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/binary_wiarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/binary_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -25,10 +25,10 @@ #include <boost/archive/binary_iarchive_impl.hpp> #include <boost/archive/detail/register_archive.hpp> -namespace boost { +namespace boost { namespace archive { -class binary_wiarchive : +class binary_wiarchive : public binary_iarchive_impl< binary_wiarchive, std::wistream::char_type, std::wistream::traits_type > diff --git a/contrib/restricted/boost/serialization/include/boost/archive/binary_woarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/binary_woarchive.hpp index a8817d6f8b..6735ceba6c 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/binary_woarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/binary_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_woarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -25,13 +25,13 @@ #include <boost/archive/binary_oarchive_impl.hpp> #include <boost/archive/detail/register_archive.hpp> -namespace boost { +namespace boost { namespace archive { // do not derive from this class. If you want to extend this functionality // via inhertance, derived from binary_oarchive_impl instead. This will // preserve correct static polymorphism. -class binary_woarchive : +class binary_woarchive : public binary_oarchive_impl< binary_woarchive, std::wostream::char_type, std::wostream::traits_type > diff --git a/contrib/restricted/boost/serialization/include/boost/archive/codecvt_null.hpp b/contrib/restricted/boost/serialization/include/boost/archive/codecvt_null.hpp index 3d9a2dea92..a93cbd5e1e 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/codecvt_null.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/codecvt_null.hpp @@ -24,7 +24,7 @@ #include <boost/config.hpp> #include <boost/serialization/force_include.hpp> #include <boost/archive/detail/auto_link_archive.hpp> -#include <boost/archive/detail/abi_prefix.hpp> // must be the last header +//#include <boost/archive/detail/abi_prefix.hpp> // must be the last header #if defined(BOOST_NO_STDC_NAMESPACE) namespace std { @@ -52,21 +52,21 @@ class codecvt_null; template<> class codecvt_null<char> : public std::codecvt<char, char, std::mbstate_t> { - virtual bool do_always_noconv() const noexcept { + bool do_always_noconv() const noexcept BOOST_OVERRIDE { return true; } public: explicit codecvt_null(std::size_t no_locale_manage = 0) : std::codecvt<char, char, std::mbstate_t>(no_locale_manage) {} - virtual ~codecvt_null(){}; + ~codecvt_null() BOOST_OVERRIDE {} }; template<> -class BOOST_WARCHIVE_DECL codecvt_null<wchar_t> : +class BOOST_SYMBOL_VISIBLE codecvt_null<wchar_t> : public std::codecvt<wchar_t, char, std::mbstate_t> { - virtual std::codecvt_base::result + BOOST_SYMBOL_EXPORT std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * first1, @@ -75,8 +75,9 @@ class BOOST_WARCHIVE_DECL codecvt_null<wchar_t> : char * first2, char * last2, char * & next2 - ) const; - virtual std::codecvt_base::result + ) const BOOST_OVERRIDE; + + BOOST_SYMBOL_EXPORT std::codecvt_base::result do_in( std::mbstate_t & state, const char * first1, @@ -85,18 +86,23 @@ class BOOST_WARCHIVE_DECL codecvt_null<wchar_t> : wchar_t * first2, wchar_t * last2, wchar_t * & next2 - ) const; - virtual int do_encoding( ) const noexcept{ + ) const BOOST_OVERRIDE; + + BOOST_SYMBOL_EXPORT virtual int do_encoding( ) const noexcept BOOST_OVERRIDE { return sizeof(wchar_t) / sizeof(char); } - virtual int do_max_length( ) const noexcept{ + + BOOST_SYMBOL_EXPORT bool do_always_noconv() const throw() BOOST_OVERRIDE { + return false; + } + + BOOST_SYMBOL_EXPORT int do_max_length( ) const noexcept BOOST_OVERRIDE { return do_encoding(); } public: - explicit codecvt_null(std::size_t no_locale_manage = 0) : - std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage) - {} - //virtual ~codecvt_null(){}; + BOOST_SYMBOL_EXPORT explicit codecvt_null(std::size_t no_locale_manage = 0); + + BOOST_SYMBOL_EXPORT ~codecvt_null() BOOST_OVERRIDE ; }; } // namespace archive @@ -105,6 +111,6 @@ public: #ifdef BOOST_MSVC # pragma warning(pop) #endif -#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas +//#include <boost/archive/detail/abi_suffix.hpp> // pop pragmas #endif //BOOST_ARCHIVE_CODECVT_NULL_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_prefix.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_prefix.hpp index debf79e9f0..b45253b532 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_prefix.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_prefix.hpp @@ -1,7 +1,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // abi_prefix.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_suffix.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_suffix.hpp index 4e054d6621..f3307c92e7 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_suffix.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/abi_suffix.hpp @@ -1,7 +1,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // abi_suffix.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/archive_serializer_map.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/archive_serializer_map.hpp index 5432bfc73e..1e94e258a7 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/archive_serializer_map.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/archive_serializer_map.hpp @@ -7,10 +7,10 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// archive_serializer_map.hpp: extenstion of type_info required for +// archive_serializer_map.hpp: extenstion of type_info required for // serialization. -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2009 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) @@ -18,7 +18,7 @@ // See http://www.boost.org for updates, documentation, and revision history. // note: this is nothing more than the thinest of wrappers around -// basic_serializer_map so we can have a one map / archive type. +// basic_serializer_map so we can have a one map / archive type. #include <boost/config.hpp> #include <boost/archive/detail/auto_link_archive.hpp> diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_archive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_archive.hpp index 79b0e490d6..fefd3ab2fb 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_archive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_archive.hpp @@ -16,12 +16,12 @@ // See library home page at http://www.boost.org/libs/serialization -//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html -// enable automatic library variant selection ------------------------------// +// enable automatic library variant selection ------------------------------// #include <boost/archive/detail/decl.hpp> diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_warchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_warchive.hpp index 683d191c20..4f506864dc 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_warchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/auto_link_warchive.hpp @@ -16,12 +16,12 @@ // See library home page at http://www.boost.org/libs/serialization -//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html -// enable automatic library variant selection ------------------------------// +// enable automatic library variant selection ------------------------------// #include <boost/archive/detail/decl.hpp> diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iarchive.hpp index 1f5a8bf63b..a3eb9342f6 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_iarchive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -72,27 +72,27 @@ public: const basic_iserializer & bis ); BOOST_ARCHIVE_DECL void load_object( - void *t, + void *t, const basic_iserializer & bis ); - BOOST_ARCHIVE_DECL const basic_pointer_iserializer * + BOOST_ARCHIVE_DECL const basic_pointer_iserializer * load_pointer( - void * & t, + void * & t, const basic_pointer_iserializer * bpis_ptr, const basic_pointer_iserializer * (*finder)( const boost::serialization::extended_type_info & eti ) ); // real public API starts here - BOOST_ARCHIVE_DECL void - set_library_version(library_version_type archive_library_version); - BOOST_ARCHIVE_DECL library_version_type + BOOST_ARCHIVE_DECL void + set_library_version(boost::serialization::library_version_type archive_library_version); + BOOST_ARCHIVE_DECL boost::serialization::library_version_type get_library_version() const; BOOST_ARCHIVE_DECL unsigned int get_flags() const; - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void reset_object_address(const void * new_address, const void * old_address); - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void delete_created_pointers(); }; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iserializer.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iserializer.hpp index 0d66674c34..98c9c4745c 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iserializer.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_iserializer.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_iserializer.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -42,7 +42,7 @@ namespace detail { class basic_iarchive; class basic_pointer_iserializer; -class BOOST_SYMBOL_VISIBLE basic_iserializer : +class BOOST_SYMBOL_VISIBLE basic_iserializer : public basic_serializer { private: @@ -63,7 +63,7 @@ public: return m_bpis; } virtual void load_object_data( - basic_iarchive & ar, + basic_iarchive & ar, void *x, const unsigned int file_version ) const = 0; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oarchive.hpp index c379108d58..36e80d10b5 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_oarchive.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -69,19 +69,19 @@ public: const basic_oserializer & bos ); BOOST_ARCHIVE_DECL void save_object( - const void *x, + const void *x, const basic_oserializer & bos ); BOOST_ARCHIVE_DECL void save_pointer( - const void * t, + const void * t, const basic_pointer_oserializer * bpos_ptr ); void save_null_pointer(){ - vsave(NULL_POINTER_TAG); + vsave(BOOST_SERIALIZATION_NULL_POINTER_TAG); } // real public interface starts here BOOST_ARCHIVE_DECL void end_preamble(); // default implementation does nothing - BOOST_ARCHIVE_DECL library_version_type get_library_version() const; + BOOST_ARCHIVE_DECL boost::serialization::library_version_type get_library_version() const; BOOST_ARCHIVE_DECL unsigned int get_flags() const; }; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oserializer.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oserializer.hpp index 94247e9005..b3f956776f 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oserializer.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_oserializer.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_oserializer.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_iserializer.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_iserializer.hpp index 1fc4b14d6e..be805a42ae 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_iserializer.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_iserializer.hpp @@ -7,10 +7,10 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_pointer_oserializer.hpp: extenstion of type_info required for +// basic_pointer_oserializer.hpp: extenstion of type_info required for // serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -51,7 +51,7 @@ public: virtual void * heap_allocation() const = 0; virtual const basic_iserializer & get_basic_serializer() const = 0; virtual void load_object_ptr( - basic_iarchive & ar, + basic_iarchive & ar, void * x, const unsigned int file_version ) const = 0; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_oserializer.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_oserializer.hpp index 1a5d9549ea..86376568a0 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_oserializer.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_pointer_oserializer.hpp @@ -7,10 +7,10 @@ #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_pointer_oserializer.hpp: extenstion of type_info required for +// basic_pointer_oserializer.hpp: extenstion of type_info required for // serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -39,7 +39,7 @@ namespace detail { class basic_oarchive; class basic_oserializer; -class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer : +class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer : public basic_serializer { protected: diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer.hpp index f9c4203f86..9c2535bf32 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_serializer.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -32,18 +32,18 @@ namespace boost { namespace archive { namespace detail { -class basic_serializer : +class basic_serializer : private boost::noncopyable { const boost::serialization::extended_type_info * m_eti; protected: explicit basic_serializer( const boost::serialization::extended_type_info & eti - ) : + ) : m_eti(& eti) {} public: - inline bool + inline bool operator<(const basic_serializer & rhs) const { // can't compare address since there can be multiple eti records // for the same type in different execution modules (that is, DLLS) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer_map.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer_map.hpp index 7934180336..78c6a52d31 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer_map.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/basic_serializer_map.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_serializer_map.hpp: extenstion of type_info required for serialization. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -24,7 +24,7 @@ #include <boost/archive/detail/abi_prefix.hpp> // must be the last header -namespace boost { +namespace boost { namespace serialization { class extended_type_info; } @@ -45,7 +45,7 @@ basic_serializer_map : public ) const ; }; typedef std::set< - const basic_serializer *, + const basic_serializer *, type_info_pointer_compare > map_type; map_type m_map; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/check.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/check.hpp index 10034e7d10..5bf0a48bb8 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/check.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/check.hpp @@ -4,18 +4,20 @@ // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once -#pragma inline_depth(511) +#if !defined(__clang__) +#pragma inline_depth(255) #pragma inline_recursion(on) #endif +#endif #if defined(__MWERKS__) -#pragma inline_depth(511) +#pragma inline_depth(255) #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // check.hpp: interface for serialization system. -// (C) Copyright 2009 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2009 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) @@ -49,7 +51,7 @@ namespace detail { template<class T> inline void check_object_level(){ - typedef + typedef typename mpl::greater_equal< serialization::implementation_level< T >, mpl::int_<serialization::primitive_type> @@ -62,7 +64,7 @@ inline void check_object_level(){ template<class T> inline void check_object_versioning(){ - typedef + typedef typename mpl::or_< typename mpl::greater< serialization::implementation_level< T >, @@ -90,8 +92,8 @@ inline void check_object_tracking(){ // saving an non-const object of a type not marked "track_never) // may be an indicator of an error usage of the - // serialization library and should be double checked. - // See documentation on object tracking. Also, see the + // serialization library and should be double checked. + // See documentation on object tracking. Also, see the // "rationale" section of the documenation // for motivation for this checking. @@ -104,7 +106,7 @@ template<class T> inline void check_pointer_level(){ // we should only invoke this once we KNOW that T // has been used as a pointer!! - typedef + typedef typename mpl::or_< typename mpl::greater< serialization::implementation_level< T >, @@ -126,12 +128,12 @@ inline void check_pointer_level(){ // in this case, indication that an object is tracked is // not stored in the archive itself - see level == object_serializable - // but rather the existence of the operation ar >> T * is used to + // but rather the existence of the operation ar >> T * is used to // infer that an object of this type should be tracked. So, if // you save via a pointer but don't load via a pointer the operation // will fail on load without given any valid reason for the failure. - // So if your program traps here, consider changing the + // So if your program traps here, consider changing the // tracking or implementation level traits - or not // serializing via a pointer. BOOST_STATIC_WARNING(typex::value); diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/common_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/common_iarchive.hpp index 4176a8a5ef..2935e3101e 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/common_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/common_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // common_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -42,22 +42,22 @@ class BOOST_SYMBOL_VISIBLE common_iarchive : friend class interface_iarchive<Archive>; friend class basic_iarchive; private: - virtual void vload(version_type & t){ - * this->This() >> t; + void vload(version_type & t) BOOST_OVERRIDE { + * this->This() >> t; } - virtual void vload(object_id_type & t){ + void vload(object_id_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(class_id_type & t){ + void vload(class_id_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(class_id_optional_type & t){ + void vload(class_id_optional_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(tracking_type & t){ + void vload(tracking_type & t) BOOST_OVERRIDE { * this->This() >> t; } - virtual void vload(class_name_type &s){ + void vload(class_name_type &s) BOOST_OVERRIDE { * this->This() >> s; } protected: @@ -71,7 +71,7 @@ protected: void load_start(const char * /*name*/){} void load_end(const char * /*name*/){} // default archive initialization - common_iarchive(unsigned int flags = 0) : + common_iarchive(unsigned int flags = 0) : basic_iarchive(flags), interface_iarchive<Archive>() {} @@ -86,4 +86,3 @@ protected: #endif #endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP - diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/common_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/common_oarchive.hpp index f7428637e4..fde6066026 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/common_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/common_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // common_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -40,28 +40,28 @@ class BOOST_SYMBOL_VISIBLE common_oarchive : friend class interface_oarchive<Archive>; friend class basic_oarchive; private: - virtual void vsave(const version_type t){ + void vsave(const version_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const object_id_type t){ + void vsave(const object_id_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const object_reference_type t){ + void vsave(const object_reference_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_id_type t){ + void vsave(const class_id_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_id_reference_type t){ + void vsave(const class_id_reference_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_id_optional_type t){ + void vsave(const class_id_optional_type t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const class_name_type & t){ + void vsave(const class_name_type & t) BOOST_OVERRIDE { * this->This() << t; } - virtual void vsave(const tracking_type t){ + void vsave(const tracking_type t) BOOST_OVERRIDE { * this->This() << t; } protected: @@ -72,7 +72,7 @@ protected: } void save_start(const char * /*name*/){} void save_end(const char * /*name*/){} - common_oarchive(unsigned int flags = 0) : + common_oarchive(unsigned int flags = 0) : basic_oarchive(flags), interface_oarchive<Archive>() {} diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/decl.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/decl.hpp index 4f731cded3..70555c31fa 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/decl.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/decl.hpp @@ -1,10 +1,10 @@ #ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP -#define BOOST_ARCHIVE_DETAIL_DECL_HPP +#define BOOST_ARCHIVE_DETAIL_DECL_HPP // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once -#endif +#endif /////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8 // decl.hpp @@ -16,7 +16,7 @@ // See library home page at http://www.boost.org/libs/serialization -//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_iarchive.hpp index 4a99e28b59..5024a4d480 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // interface_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -31,10 +31,10 @@ namespace detail { class basic_pointer_iserializer; template<class Archive> -class interface_iarchive +class interface_iarchive { protected: - interface_iarchive(){}; + interface_iarchive() {} public: ///////////////////////////////////////////////////////// // archive public interface @@ -47,11 +47,11 @@ public: } template<class T> - const basic_pointer_iserializer * + const basic_pointer_iserializer * register_type(T * = NULL){ const basic_pointer_iserializer & bpis = boost::serialization::singleton< - pointer_iserializer<Archive, T> + pointer_iserializer<Archive, T> >::get_const_instance(); this->This()->register_basic_serializer(bpis.get_basic_serializer()); return & bpis; @@ -62,14 +62,14 @@ public: helper_collection & hc = this->This()->get_helper_collection(); return hc.template find_helper<Helper>(id); } - + template<class T> Archive & operator>>(T & t){ this->This()->load_override(t); return * this->This(); } - // the & operator + // the & operator template<class T> Archive & operator&(T & t){ return *(this->This()) >> t; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_oarchive.hpp index 359463ed9d..44b47e6198 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/interface_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // interface_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -32,10 +32,10 @@ namespace detail { class basic_pointer_oserializer; template<class Archive> -class interface_oarchive +class interface_oarchive { protected: - interface_oarchive(){}; + interface_oarchive() {} public: ///////////////////////////////////////////////////////// // archive public interface @@ -48,7 +48,7 @@ public: } template<class T> - const basic_pointer_oserializer * + const basic_pointer_oserializer * register_type(const T * = NULL){ const basic_pointer_oserializer & bpos = boost::serialization::singleton< @@ -57,7 +57,7 @@ public: this->This()->register_basic_serializer(bpos.get_basic_serializer()); return & bpos; } - + template<class Helper> Helper & get_helper(void * const id = 0){ @@ -70,8 +70,8 @@ public: this->This()->save_override(t); return * this->This(); } - - // the & operator + + // the & operator template<class T> Archive & operator&(const T & t){ return * this ->This() << t; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/iserializer.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/iserializer.hpp index 6c2fd67ddd..b1a9d438bc 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/iserializer.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/iserializer.hpp @@ -2,20 +2,22 @@ #define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) +#if defined(BOOST_MSVC) # pragma once -#pragma inline_depth(511) +#if !defined(__clang__) +#pragma inline_depth(255) #pragma inline_recursion(on) #endif +#endif #if defined(__MWERKS__) -#pragma inline_depth(511) +#pragma inline_depth(255) #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // iserializer.hpp: interface for serialization system. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -28,8 +30,8 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -41,8 +43,8 @@ namespace std{ #include <boost/mpl/equal_to.hpp> #include <boost/core/no_exceptions_support.hpp> -#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO - #include <boost/serialization/extended_type_info_typeid.hpp> +#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO + #include <boost/serialization/extended_type_info_typeid.hpp> #endif #include <boost/serialization/throw_exception.hpp> #include <boost/serialization/smart_cast.hpp> @@ -60,12 +62,12 @@ namespace std{ #if !defined(BOOST_MSVC) && \ (BOOST_WORKAROUND(__IBMCPP__, < 1210) || \ defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590)) - #define DONT_USE_HAS_NEW_OPERATOR 1 + #define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 1 #else - #define DONT_USE_HAS_NEW_OPERATOR 0 + #define BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR 0 #endif -#if ! DONT_USE_HAS_NEW_OPERATOR +#if ! BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR #include <boost/type_traits/has_new_operator.hpp> #endif @@ -120,43 +122,41 @@ template<class Archive, class T> class iserializer : public basic_iserializer { private: - virtual void destroy(/*const*/ void *address) const { + void destroy(/*const*/ void *address) const BOOST_OVERRIDE { boost::serialization::access::destroy(static_cast<T *>(address)); } -protected: - // protected constructor since it's always created by singleton +public: explicit iserializer() : basic_iserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) {} -public: - virtual BOOST_DLLEXPORT void load_object_data( + BOOST_DLLEXPORT void load_object_data( basic_iarchive & ar, - void *x, + void *x, const unsigned int file_version - ) const BOOST_USED; - virtual bool class_info() const { - return boost::serialization::implementation_level< T >::value + ) const BOOST_OVERRIDE BOOST_USED; + bool class_info() const BOOST_OVERRIDE { + return boost::serialization::implementation_level< T >::value >= boost::serialization::object_class_info; } - virtual bool tracking(const unsigned int /* flags */) const { - return boost::serialization::tracking_level< T >::value + bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE { + return boost::serialization::tracking_level< T >::value == boost::serialization::track_always - || ( boost::serialization::tracking_level< T >::value + || ( boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively && serialized_as_pointer()); } - virtual version_type version() const { + version_type version() const BOOST_OVERRIDE { return version_type(::boost::serialization::version< T >::value); } - virtual bool is_polymorphic() const { + bool is_polymorphic() const BOOST_OVERRIDE { return boost::is_polymorphic< T >::value; } - virtual ~iserializer(){}; + ~iserializer() BOOST_OVERRIDE {} }; #ifdef BOOST_MSVC @@ -166,12 +166,12 @@ public: template<class Archive, class T> BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data( basic_iarchive & ar, - void *x, + void *x, const unsigned int file_version ) const { // note: we now comment this out. Before we permited archive // version # to be very large. Now we don't. To permit - // readers of these old archives, we have to suppress this + // readers of these old archives, we have to suppress this // code. Perhaps in the future we might re-enable it but // permit its suppression with a runtime switch. #if 0 @@ -188,7 +188,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data( // be specialized by the user. boost::serialization::serialize_adl( boost::serialization::smart_cast_reference<Archive &>(ar), - * static_cast<T *>(x), + * static_cast<T *>(x), file_version ); } @@ -201,7 +201,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data( // the purpose of this code is to allocate memory for an object // without requiring the constructor to be called. Presumably // the allocated object will be subsequently initialized with -// "placement new". +// "placement new". // note: we have the boost type trait has_new_operator but we // have no corresponding has_delete_operator. So we presume // that the former being true would imply that the a delete @@ -210,7 +210,7 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data( template<class T> struct heap_allocation { // boost::has_new_operator< T > doesn't work on these compilers - #if DONT_USE_HAS_NEW_OPERATOR + #if BOOST_SERIALIZATION_DONT_USE_HAS_NEW_OPERATOR // This doesn't handle operator new overload for class T static T * invoke_new(){ return static_cast<T *>(operator new(sizeof(T))); @@ -252,7 +252,7 @@ struct heap_allocation { mpl::eval_if< boost::has_new_operator< T >, mpl::identity<has_new_operator >, - mpl::identity<doesnt_have_new_operator > + mpl::identity<doesnt_have_new_operator > >::type typex; return typex::invoke_new(); } @@ -261,7 +261,7 @@ struct heap_allocation { mpl::eval_if< boost::has_new_operator< T >, mpl::identity<has_new_operator >, - mpl::identity<doesnt_have_new_operator > + mpl::identity<doesnt_have_new_operator > >::type typex; typex::invoke_delete(t); } @@ -291,26 +291,26 @@ class pointer_iserializer : public basic_pointer_iserializer { private: - virtual void * heap_allocation() const { + void * heap_allocation() const BOOST_OVERRIDE { detail::heap_allocation<T> h; T * t = h.get(); h.release(); return t; } - virtual const basic_iserializer & get_basic_serializer() const { + const basic_iserializer & get_basic_serializer() const BOOST_OVERRIDE { return boost::serialization::singleton< iserializer<Archive, T> >::get_const_instance(); } - BOOST_DLLEXPORT virtual void load_object_ptr( - basic_iarchive & ar, + BOOST_DLLEXPORT void load_object_ptr( + basic_iarchive & ar, void * x, const unsigned int file_version - ) const BOOST_USED; -protected: + ) const BOOST_OVERRIDE BOOST_USED; +public: // this should alway be a singleton so make the constructor protected pointer_iserializer(); - ~pointer_iserializer(); + ~pointer_iserializer() BOOST_OVERRIDE; }; #ifdef BOOST_MSVC @@ -321,12 +321,12 @@ protected: // serialized only through base class won't get optimized out template<class Archive, class T> BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr( - basic_iarchive & ar, + basic_iarchive & ar, void * t, const unsigned int file_version ) const { - Archive & ar_impl = + Archive & ar_impl = boost::serialization::smart_cast_reference<Archive &>(ar); // note that the above will throw std::bad_alloc if the allocation @@ -336,7 +336,7 @@ BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr( // automatically delete the t which is most likely not fully // constructed BOOST_TRY { - // this addresses an obscure situation that occurs when + // this addresses an obscure situation that occurs when // load_constructor de-serializes something through a pointer. ar.next_object_pointer(t); boost::serialization::load_construct_data_adl<Archive, T>( @@ -360,7 +360,7 @@ template<class Archive, class T> pointer_iserializer<Archive, T>::pointer_iserializer() : basic_pointer_iserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) @@ -395,8 +395,8 @@ struct load_non_pointer_type { // make sure call is routed through the higest interface that might // be specialized by the user. boost::serialization::serialize_adl( - ar, - const_cast<T &>(t), + ar, + const_cast<T &>(t), boost::serialization::version< T >::value ); } @@ -409,7 +409,7 @@ struct load_non_pointer_type { static void invoke(Archive &ar, const T & t){ void * x = boost::addressof(const_cast<T &>(t)); ar.load_object( - x, + x, boost::serialization::singleton< iserializer<Archive, T> >::get_const_instance() @@ -486,7 +486,7 @@ struct load_pointer_type { template<class T> static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){ - // there should never be any need to load an abstract polymorphic + // there should never be any need to load an abstract polymorphic // class pointer. Inhibiting code generation for this // permits abstract base classes to be used - note: exception // virtual serialize functions used for plug-ins @@ -494,7 +494,7 @@ struct load_pointer_type { mpl::eval_if< boost::serialization::is_abstract<const T>, boost::mpl::identity<abstract>, - boost::mpl::identity<non_abstract> + boost::mpl::identity<non_abstract> >::type typex; return typex::template register_type< T >(ar); } @@ -510,7 +510,7 @@ struct load_pointer_type { boost::serialization::void_upcast( eti, boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance(), t @@ -572,13 +572,13 @@ struct load_array_type { template<class T> static void invoke(Archive &ar, T &t){ typedef typename remove_extent< T >::type value_type; - + // convert integers to correct enum to load // determine number of elements in the array. Consider the - // fact that some machines will align elements on boundries + // fact that some machines will align elements on boundaries // other than characters. std::size_t current_count = sizeof(t) / ( - static_cast<char *>(static_cast<void *>(&t[1])) + static_cast<char *>(static_cast<void *>(&t[1])) - static_cast<char *>(static_cast<void *>(&t[0])) ); boost::serialization::collection_size_type count; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/oserializer.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/oserializer.hpp index 612e1f2cb1..f6a77edfce 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/oserializer.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/oserializer.hpp @@ -4,18 +4,20 @@ // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once -#pragma inline_depth(511) +#if !defined(__clang__) +#pragma inline_depth(255) #pragma inline_recursion(on) #endif +#endif #if defined(__MWERKS__) -#pragma inline_depth(511) +#pragma inline_depth(255) #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // oserializer.hpp: interface for serialization system. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -36,8 +38,8 @@ #include <boost/mpl/identity.hpp> #include <boost/mpl/bool_fwd.hpp> -#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO - #include <boost/serialization/extended_type_info_typeid.hpp> +#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO + #include <boost/serialization/extended_type_info_typeid.hpp> #endif #include <boost/serialization/throw_exception.hpp> #include <boost/serialization/smart_cast.hpp> @@ -105,37 +107,37 @@ template<class Archive, class T> class oserializer : public basic_oserializer { private: - // private constructor to inhibit any existence other than the + // private constructor to inhibit any existence other than the // static one public: explicit BOOST_DLLEXPORT oserializer() : basic_oserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) {} - virtual BOOST_DLLEXPORT void save_object_data( - basic_oarchive & ar, + BOOST_DLLEXPORT void save_object_data( + basic_oarchive & ar, const void *x - ) const BOOST_USED; - virtual bool class_info() const { - return boost::serialization::implementation_level< T >::value + ) const BOOST_OVERRIDE BOOST_USED; + bool class_info() const BOOST_OVERRIDE { + return boost::serialization::implementation_level< T >::value >= boost::serialization::object_class_info; } - virtual bool tracking(const unsigned int /* flags */) const { + bool tracking(const unsigned int /* flags */) const BOOST_OVERRIDE { return boost::serialization::tracking_level< T >::value == boost::serialization::track_always || (boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively && serialized_as_pointer()); } - virtual version_type version() const { + version_type version() const BOOST_OVERRIDE { return version_type(::boost::serialization::version< T >::value); } - virtual bool is_polymorphic() const { + bool is_polymorphic() const BOOST_OVERRIDE { return boost::is_polymorphic< T >::value; } - virtual ~oserializer(){} + ~oserializer() BOOST_OVERRIDE {} }; #ifdef BOOST_MSVC @@ -144,7 +146,7 @@ public: template<class Archive, class T> BOOST_DLLEXPORT void oserializer<Archive, T>::save_object_data( - basic_oarchive & ar, + basic_oarchive & ar, const void *x ) const { // make sure call is routed through the highest interface that might @@ -167,19 +169,19 @@ class pointer_oserializer : public basic_pointer_oserializer { private: - const basic_oserializer & - get_basic_serializer() const { + const basic_oserializer & + get_basic_serializer() const BOOST_OVERRIDE { return boost::serialization::singleton< oserializer<Archive, T> >::get_const_instance(); } - virtual BOOST_DLLEXPORT void save_object_ptr( + BOOST_DLLEXPORT void save_object_ptr( basic_oarchive & ar, const void * x - ) const BOOST_USED; + ) const BOOST_OVERRIDE BOOST_USED; public: pointer_oserializer(); - ~pointer_oserializer(); + ~pointer_oserializer() BOOST_OVERRIDE; }; #ifdef BOOST_MSVC @@ -196,11 +198,11 @@ BOOST_DLLEXPORT void pointer_oserializer<Archive, T>::save_object_ptr( // be specialized by the user. T * t = static_cast<T *>(const_cast<void *>(x)); const unsigned int file_version = boost::serialization::version< T >::value; - Archive & ar_impl + Archive & ar_impl = boost::serialization::smart_cast_reference<Archive &>(ar); boost::serialization::save_construct_data_adl<Archive, T>( - ar_impl, - t, + ar_impl, + t, file_version ); ar_impl << boost::serialization::make_nvp(NULL, * t); @@ -210,14 +212,14 @@ template<class Archive, class T> pointer_oserializer<Archive, T>::pointer_oserializer() : basic_pointer_oserializer( boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() ) { // make sure appropriate member function is instantiated boost::serialization::singleton< - oserializer<Archive, T> + oserializer<Archive, T> >::get_mutable_instance().set_bpos(this); archive_serializer_map<Archive>::insert(this); } @@ -244,8 +246,8 @@ struct save_non_pointer_type { // make sure call is routed through the highest interface that might // be specialized by the user. boost::serialization::serialize_adl( - ar, - const_cast<T &>(t), + ar, + const_cast<T &>(t), ::boost::serialization::version< T >::value ); } @@ -281,7 +283,7 @@ struct save_non_pointer_type { template<class T> static void invoke(Archive & ar, const T & t){ - typedef + typedef typename mpl::eval_if< // if its primitive mpl::equal_to< @@ -310,7 +312,7 @@ struct save_non_pointer_type { // else // do a fast save only tracking is turned off mpl::identity<save_conditional> - > > >::type typex; + > > >::type typex; check_object_versioning< T >(); typex::invoke(ar, t); } @@ -344,15 +346,15 @@ struct save_pointer_type { template<class T> static const basic_pointer_oserializer * register_type(Archive &ar, T* const /*t*/){ - // there should never be any need to save an abstract polymorphic + // there should never be any need to save an abstract polymorphic // class pointer. Inhibiting code generation for this // permits abstract base classes to be used - note: exception // virtual serialize functions used for plug-ins - typedef + typedef typename mpl::eval_if< boost::serialization::is_abstract< T >, mpl::identity<abstract>, - mpl::identity<non_abstract> + mpl::identity<non_abstract> >::type typex; return typex::template register_type< T >(ar); } @@ -361,10 +363,10 @@ struct save_pointer_type { { template<class T> static void save( - Archive &ar, + Archive &ar, T & t ){ - const basic_pointer_oserializer & bpos = + const basic_pointer_oserializer & bpos = boost::serialization::singleton< pointer_oserializer<Archive, T> >::get_const_instance(); @@ -377,13 +379,13 @@ struct save_pointer_type { { template<class T> static void save( - Archive &ar, + Archive &ar, T & t ){ - typename + typename boost::serialization::type_info_implementation< T >::type const & i = boost::serialization::singleton< - typename + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance(); @@ -417,8 +419,8 @@ struct save_pointer_type { // convert pointer to more derived type. if this is thrown // it means that the base/derived relationship hasn't be registered vp = serialization::void_downcast( - *true_type, - *this_type, + *true_type, + *this_type, static_cast<const void *>(&t) ); if(NULL == vp){ @@ -431,7 +433,7 @@ struct save_pointer_type { ); } - // since true_type is valid, and this only gets made if the + // since true_type is valid, and this only gets made if the // pointer oserializer object has been created, this should never // fail const basic_pointer_oserializer * bpos @@ -454,7 +456,7 @@ struct save_pointer_type { template<class T> static void save( - Archive & ar, + Archive & ar, const T & t ){ check_pointer_level< T >(); @@ -471,7 +473,7 @@ struct save_pointer_type { static void invoke(Archive &ar, const TPtr t){ register_type(ar, t); if(NULL == t){ - basic_oarchive & boa + basic_oarchive & boa = boost::serialization::smart_cast_reference<basic_oarchive &>(ar); boa.save_null_pointer(); save_access::end_preamble(ar); @@ -498,11 +500,11 @@ struct save_array_type template<class T> static void invoke(Archive &ar, const T &t){ typedef typename boost::remove_extent< T >::type value_type; - + save_access::end_preamble(ar); // consider alignment std::size_t c = sizeof(t) / ( - static_cast<const char *>(static_cast<const void *>(&t[1])) + static_cast<const char *>(static_cast<const void *>(&t[1])) - static_cast<const char *>(static_cast<const void *>(&t[0])) ); boost::serialization::collection_size_type count(c); @@ -522,7 +524,7 @@ struct save_array_type template<class Archive, class T> inline void save(Archive & ar, /*const*/ T &t){ - typedef + typedef typename mpl::eval_if<is_pointer< T >, mpl::identity<detail::save_pointer_type<Archive> >, //else diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/polymorphic_iarchive_route.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/polymorphic_iarchive_route.hpp new file mode 100644 index 0000000000..381c50eba0 --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/polymorphic_iarchive_route.hpp @@ -0,0 +1,218 @@ +#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP +#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_iarchive_route.hpp + +// (C) Copyright 2002 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. + +#include <string> +#include <ostream> +#include <cstddef> + +#include <boost/config.hpp> +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include <boost/cstdint.hpp> +#include <boost/integer_traits.hpp> +#include <boost/archive/polymorphic_iarchive.hpp> +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization +namespace archive { +namespace detail{ + +class basic_iserializer; +class basic_pointer_iserializer; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template<class ArchiveImplementation> +class polymorphic_iarchive_route : + public polymorphic_iarchive, + // note: gcc dynamic cross cast fails if the the derivation below is + // not public. I think this is a mistake. + public /*protected*/ ArchiveImplementation +{ +private: + // these are used by the serialization library. + void load_object( + void *t, + const basic_iserializer & bis + ) BOOST_OVERRIDE { + ArchiveImplementation::load_object(t, bis); + } + const basic_pointer_iserializer * load_pointer( + void * & t, + const basic_pointer_iserializer * bpis_ptr, + const basic_pointer_iserializer * (*finder)( + const boost::serialization::extended_type_info & type + ) + ) BOOST_OVERRIDE { + return ArchiveImplementation::load_pointer(t, bpis_ptr, finder); + } + void set_library_version(boost::serialization::library_version_type archive_library_version) BOOST_OVERRIDE { + ArchiveImplementation::set_library_version(archive_library_version); + } + boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE { + return ArchiveImplementation::get_library_version(); + } + unsigned int get_flags() const BOOST_OVERRIDE { + return ArchiveImplementation::get_flags(); + } + void delete_created_pointers() BOOST_OVERRIDE { + ArchiveImplementation::delete_created_pointers(); + } + void reset_object_address( + const void * new_address, + const void * old_address + ) BOOST_OVERRIDE { + ArchiveImplementation::reset_object_address(new_address, old_address); + } + void load_binary(void * t, std::size_t size) BOOST_OVERRIDE { + ArchiveImplementation::load_binary(t, size); + } + // primitive types the only ones permitted by polymorphic archives + void load(bool & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(char & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(signed char & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(unsigned char & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + #ifndef BOOST_NO_CWCHAR + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + void load(wchar_t & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + #endif + #endif + void load(short & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(unsigned short & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(int & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(unsigned int & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(long & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(unsigned long & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + #if defined(BOOST_HAS_LONG_LONG) + void load(boost::long_long_type & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(boost::ulong_long_type & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + #elif defined(BOOST_HAS_MS_INT64) + void load(__int64 & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(unsigned __int64 & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + #endif + void load(float & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(double & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + void load(std::string & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + #ifndef BOOST_NO_STD_WSTRING + void load(std::wstring & t) BOOST_OVERRIDE { + ArchiveImplementation::load(t); + } + #endif + // used for xml and other tagged formats default does nothing + void load_start(const char * name) BOOST_OVERRIDE { + ArchiveImplementation::load_start(name); + } + void load_end(const char * name) BOOST_OVERRIDE { + ArchiveImplementation::load_end(name); + } + void register_basic_serializer(const basic_iserializer & bis) BOOST_OVERRIDE { + ArchiveImplementation::register_basic_serializer(bis); + } + helper_collection & + get_helper_collection() BOOST_OVERRIDE { + return ArchiveImplementation::get_helper_collection(); + } +public: + // this can't be inherited because they appear in multiple + // parents + typedef mpl::bool_<true> is_loading; + typedef mpl::bool_<false> is_saving; + // the >> operator + template<class T> + polymorphic_iarchive & operator>>(T & t){ + return polymorphic_iarchive::operator>>(t); + } + // the & operator + template<class T> + polymorphic_iarchive & operator&(T & t){ + return polymorphic_iarchive::operator&(t); + } + // register type function + template<class T> + const basic_pointer_iserializer * + register_type(T * t = NULL){ + return ArchiveImplementation::register_type(t); + } + // all current archives take a stream as constructor argument + template <class _Elem, class _Tr> + polymorphic_iarchive_route( + std::basic_istream<_Elem, _Tr> & is, + unsigned int flags = 0 + ) : + ArchiveImplementation(is, flags) + {} + ~polymorphic_iarchive_route() BOOST_OVERRIDE {} +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_DISPATCH_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/polymorphic_oarchive_route.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/polymorphic_oarchive_route.hpp new file mode 100644 index 0000000000..be67742db4 --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/polymorphic_oarchive_route.hpp @@ -0,0 +1,209 @@ +#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP +#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_oarchive_route.hpp + +// (C) Copyright 2002 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. + +#include <string> +#include <ostream> +#include <cstddef> // size_t + +#include <boost/config.hpp> +#if defined(BOOST_NO_STDC_NAMESPACE) +namespace std{ + using ::size_t; +} // namespace std +#endif + +#include <boost/cstdint.hpp> +#include <boost/integer_traits.hpp> +#include <boost/archive/polymorphic_oarchive.hpp> +#include <boost/archive/detail/abi_prefix.hpp> // must be the last header + +namespace boost { +namespace serialization { + class extended_type_info; +} // namespace serialization +namespace archive { +namespace detail{ + +class basic_oserializer; +class basic_pointer_oserializer; + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +template<class ArchiveImplementation> +class polymorphic_oarchive_route : + public polymorphic_oarchive, + // note: gcc dynamic cross cast fails if the the derivation below is + // not public. I think this is a mistake. + public /*protected*/ ArchiveImplementation +{ +private: + // these are used by the serialization library. + void save_object( + const void *x, + const detail::basic_oserializer & bos + ) BOOST_OVERRIDE { + ArchiveImplementation::save_object(x, bos); + } + void save_pointer( + const void * t, + const detail::basic_pointer_oserializer * bpos_ptr + ) BOOST_OVERRIDE { + ArchiveImplementation::save_pointer(t, bpos_ptr); + } + void save_null_pointer() BOOST_OVERRIDE { + ArchiveImplementation::save_null_pointer(); + } + // primitive types the only ones permitted by polymorphic archives + void save(const bool t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const char t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const signed char t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const unsigned char t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + #ifndef BOOST_NO_CWCHAR + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + void save(const wchar_t t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + #endif + #endif + void save(const short t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const unsigned short t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const int t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const unsigned int t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const long t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const unsigned long t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + #if defined(BOOST_HAS_LONG_LONG) + void save(const boost::long_long_type t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const boost::ulong_long_type t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + #elif defined(BOOST_HAS_MS_INT64) + void save(const boost::int64_t t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const boost::uint64_t t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + #endif + void save(const float t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const double t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + void save(const std::string & t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + #ifndef BOOST_NO_STD_WSTRING + void save(const std::wstring & t) BOOST_OVERRIDE { + ArchiveImplementation::save(t); + } + #endif + boost::serialization::library_version_type get_library_version() const BOOST_OVERRIDE { + return ArchiveImplementation::get_library_version(); + } + unsigned int get_flags() const BOOST_OVERRIDE { + return ArchiveImplementation::get_flags(); + } + void save_binary(const void * t, std::size_t size) BOOST_OVERRIDE { + ArchiveImplementation::save_binary(t, size); + } + // used for xml and other tagged formats default does nothing + void save_start(const char * name) BOOST_OVERRIDE { + ArchiveImplementation::save_start(name); + } + void save_end(const char * name) BOOST_OVERRIDE { + ArchiveImplementation::save_end(name); + } + void end_preamble() BOOST_OVERRIDE { + ArchiveImplementation::end_preamble(); + } + void register_basic_serializer(const detail::basic_oserializer & bos) BOOST_OVERRIDE { + ArchiveImplementation::register_basic_serializer(bos); + } + helper_collection & + get_helper_collection() BOOST_OVERRIDE { + return ArchiveImplementation::get_helper_collection(); + } +public: + // this can't be inherited because they appear in multiple + // parents + typedef mpl::bool_<false> is_loading; + typedef mpl::bool_<true> is_saving; + // the << operator + template<class T> + polymorphic_oarchive & operator<<(T & t){ + return polymorphic_oarchive::operator<<(t); + } + // the & operator + template<class T> + polymorphic_oarchive & operator&(T & t){ + return polymorphic_oarchive::operator&(t); + } + // register type function + template<class T> + const basic_pointer_oserializer * + register_type(T * t = NULL){ + return ArchiveImplementation::register_type(t); + } + // all current archives take a stream as constructor argument + template <class _Elem, class _Tr> + polymorphic_oarchive_route( + std::basic_ostream<_Elem, _Tr> & os, + unsigned int flags = 0 + ) : + ArchiveImplementation(os, flags) + {} + ~polymorphic_oarchive_route() BOOST_OVERRIDE {} +}; + +} // namespace detail +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas + +#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_DISPATCH_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/register_archive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/register_archive.hpp index 5ffecc702c..ebc24c05d4 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/register_archive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/register_archive.hpp @@ -4,7 +4,7 @@ #ifndef BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP # define BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP -namespace boost { namespace archive { namespace detail { +namespace boost { namespace archive { namespace detail { // No instantiate_ptr_serialization overloads generated by // BOOST_SERIALIZATION_REGISTER_ARCHIVE that lexically follow the call diff --git a/contrib/restricted/boost/serialization/include/boost/archive/detail/utf8_codecvt_facet.hpp b/contrib/restricted/boost/serialization/include/boost/archive/detail/utf8_codecvt_facet.hpp index 00b2b4193d..5c78548486 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/detail/utf8_codecvt_facet.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/detail/utf8_codecvt_facet.hpp @@ -17,7 +17,6 @@ #include <boost/archive/detail/decl.hpp> #define BOOST_UTF8_BEGIN_NAMESPACE \ namespace boost { namespace archive { namespace detail { -#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL #define BOOST_UTF8_END_NAMESPACE }}} #include <boost/detail/utf8_codecvt_facet.hpp> diff --git a/contrib/restricted/boost/serialization/include/boost/archive/dinkumware.hpp b/contrib/restricted/boost/serialization/include/boost/archive/dinkumware.hpp index 90ba6271cd..97efcea134 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/dinkumware.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/dinkumware.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // dinkumware.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -29,7 +29,7 @@ namespace std { // define i/o operators for 64 bit integers template<class CharType> -basic_ostream<CharType> & +basic_ostream<CharType> & operator<<(basic_ostream<CharType> & os, boost::uint64_t t){ // octal rendering of 64 bit number would be 22 octets + eos CharType d[23]; @@ -66,7 +66,7 @@ operator<<(basic_ostream<CharType> & os, boost::uint64_t t){ } template<class CharType> -basic_ostream<CharType> & +basic_ostream<CharType> & operator<<(basic_ostream<CharType> &os, boost::int64_t t){ if(0 <= t){ os << static_cast<boost::uint64_t>(t); @@ -79,7 +79,7 @@ operator<<(basic_ostream<CharType> &os, boost::int64_t t){ } template<class CharType> -basic_istream<CharType> & +basic_istream<CharType> & operator>>(basic_istream<CharType> &is, boost::int64_t & t){ CharType d; do{ @@ -119,7 +119,7 @@ operator>>(basic_istream<CharType> &is, boost::int64_t & t){ } template<class CharType> -basic_istream<CharType> & +basic_istream<CharType> & operator>>(basic_istream<CharType> &is, boost::uint64_t & t){ boost::int64_t it; is >> it; @@ -127,10 +127,8 @@ operator>>(basic_istream<CharType> &is, boost::uint64_t & t){ return is; } -//#endif - template<> -class back_insert_iterator<basic_string<char> > : public +class back_insert_iterator<basic_string<char> > : public iterator<output_iterator_tag, char> { public: @@ -140,7 +138,7 @@ public: explicit back_insert_iterator(container_type & s) : container(& s) {} // construct with container - + back_insert_iterator<container_type> & operator=( container_type::const_reference Val_ ){ // push value into container @@ -167,7 +165,7 @@ protected: container_type *container; // pointer to container }; -template<char> +template<char> inline back_insert_iterator<basic_string<char> > back_inserter( basic_string<char> & s ){ @@ -175,7 +173,7 @@ inline back_insert_iterator<basic_string<char> > back_inserter( } template<> -class back_insert_iterator<basic_string<wchar_t> > : public +class back_insert_iterator<basic_string<wchar_t> > : public iterator<output_iterator_tag, wchar_t> { public: @@ -185,7 +183,7 @@ public: explicit back_insert_iterator(container_type & s) : container(& s) {} // construct with container - + back_insert_iterator<container_type> & operator=( container_type::const_reference Val_ ){ // push value into container @@ -212,7 +210,7 @@ protected: container_type *container; // pointer to container }; -template<wchar_t> +template<wchar_t> inline back_insert_iterator<basic_string<wchar_t> > back_inserter( basic_string<wchar_t> & s ){ diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/archive_serializer_map.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/archive_serializer_map.ipp index 7f163ec407..98e058ddec 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/archive_serializer_map.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/archive_serializer_map.ipp @@ -47,10 +47,10 @@ archive_serializer_map<Archive>::insert(const basic_serializer * bs){ template<class Archive> BOOST_ARCHIVE_OR_WARCHIVE_DECL void archive_serializer_map<Archive>::erase(const basic_serializer * bs){ - BOOST_ASSERT(! boost::serialization::singleton< - extra_detail::map<Archive> - >::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. if(boost::serialization::singleton< extra_detail::map<Archive> >::is_destroyed()) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_iarchive.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_iarchive.ipp index d5619ab6cf..1755250e59 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_iarchive.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_iarchive.ipp @@ -22,7 +22,7 @@ namespace std{ #endif #include <boost/detail/workaround.hpp> -#include <boost/detail/endian.hpp> +#include <boost/predef/other/endian.h> #include <boost/archive/basic_binary_iarchive.hpp> @@ -48,7 +48,7 @@ basic_binary_iarchive<Archive>::load_override(class_name_type & t){ template<class Archive> BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iarchive<Archive>::init(void){ +basic_binary_iarchive<Archive>::init() { // read signature in an archive version independent manner std::string file_signature; @@ -84,12 +84,12 @@ basic_binary_iarchive<Archive>::init(void){ // make sure the version of the reading archive library can // support the format of the archive being read - library_version_type input_library_version; + boost::serialization::library_version_type input_library_version; //* this->This() >> input_library_version; { int v = 0; v = this->This()->m_sb.sbumpc(); - #if defined(BOOST_LITTLE_ENDIAN) + #if BOOST_ENDIAN_LITTLE_BYTE if(v < 6){ ; } @@ -111,11 +111,11 @@ basic_binary_iarchive<Archive>::init(void){ // version 8+ followed by a zero this->This()->m_sb.sbumpc(); } - #elif defined(BOOST_BIG_ENDIAN) + #elif BOOST_ENDIAN_BIG_BYTE if(v == 0) v = this->This()->m_sb.sbumpc(); #endif - input_library_version = static_cast<library_version_type>(v); + input_library_version = static_cast<boost::serialization::library_version_type>(v); } #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_oarchive.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_oarchive.ipp index d5a019d32b..b83ac619c6 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_oarchive.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_binary_oarchive.ipp @@ -34,7 +34,7 @@ basic_binary_oarchive<Archive>::init(){ const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); * this->This() << file_signature; // write library version - const library_version_type v(BOOST_ARCHIVE_VERSION()); + const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION()); * this->This() << v; } diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iarchive.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iarchive.ipp index 9ec8c6588c..3e2def9520 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iarchive.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iarchive.ipp @@ -45,7 +45,7 @@ basic_text_iarchive<Archive>::load_override(class_name_type & t){ template<class Archive> BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_iarchive<Archive>::init(void){ +basic_text_iarchive<Archive>::init() { // read signature in an archive version independent manner std::string file_signature; * this->This() >> file_signature; @@ -56,7 +56,7 @@ basic_text_iarchive<Archive>::init(void){ // make sure the version of the reading archive library can // support the format of the archive being read - library_version_type input_library_version; + boost::serialization::library_version_type input_library_version; * this->This() >> input_library_version; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iprimitive.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iprimitive.ipp index 4e44728068..cad9c3f8fa 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iprimitive.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_iprimitive.ipp @@ -112,8 +112,8 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive( ) : is(is_), flags_saver(is_), - precision_saver(is_), #ifndef BOOST_NO_STD_LOCALE + precision_saver(is_), codecvt_null_facet(1), archive_locale(is.getloc(), & codecvt_null_facet), locale_saver(is) @@ -125,6 +125,7 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive( is_ >> std::noboolalpha; } #else + precision_saver(is_) {} #endif diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oarchive.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oarchive.ipp index 44bc1401fd..50084ca0a0 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oarchive.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oarchive.ipp @@ -54,7 +54,7 @@ basic_text_oarchive<Archive>::init(){ const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); * this->This() << file_signature; // write library version - const library_version_type v(BOOST_ARCHIVE_VERSION()); + const boost::serialization::library_version_type v(BOOST_ARCHIVE_VERSION()); * this->This() << v; } diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oprimitive.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oprimitive.ipp index 6030fd44c5..98a8879ba3 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oprimitive.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_text_oprimitive.ipp @@ -10,7 +10,6 @@ #include <cstddef> // NULL #include <algorithm> // std::copy -#include <exception> // std::uncaught_exception #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -18,6 +17,8 @@ namespace std{ } // namespace std #endif +#include <boost/core/uncaught_exceptions.hpp> + #include <boost/archive/basic_text_oprimitive.hpp> #include <boost/archive/iterators/base64_from_binary.hpp> @@ -86,8 +87,8 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive( ) : os(os_), flags_saver(os_), - precision_saver(os_), #ifndef BOOST_NO_STD_LOCALE + precision_saver(os_), codecvt_null_facet(1), archive_locale(os.getloc(), & codecvt_null_facet), locale_saver(os) @@ -99,6 +100,7 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive( os_ << std::noboolalpha; } #else + precision_saver(os_) {} #endif @@ -106,7 +108,7 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive( template<class OStream> BOOST_ARCHIVE_OR_WARCHIVE_DECL basic_text_oprimitive<OStream>::~basic_text_oprimitive(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; os << std::endl; } diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_grammar.hpp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_grammar.hpp index 6d4e4683f6..8f70e3d2cf 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_grammar.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_grammar.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // basic_xml_grammar.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -64,13 +64,13 @@ namespace archive { // XML grammar parsing template<class CharType> -class basic_xml_grammar { +class BOOST_SYMBOL_VISIBLE basic_xml_grammar { public: // The following is not necessary according to DR45, but at least // one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise. struct return_values; friend struct return_values; - + private: typedef typename std::basic_istream<CharType> IStream; typedef typename std::basic_string<CharType> StringType; @@ -81,16 +81,16 @@ private: > scanner_t; typedef typename boost::spirit::classic::rule<scanner_t> rule_t; // Start grammar definition - rule_t + rule_t Reference, - Eq, + Eq, STag, ETag, LetterOrUnderscoreOrColon, - AttValue, - CharRef1, - CharRef2, - CharRef, + AttValue, + CharRef1, + CharRef2, + CharRef, AmpRef, LTRef, GTRef, @@ -127,11 +127,11 @@ private: chset_t BaseChar, Ideographic, - Char, - Letter, + Char, + Letter, Digit, CombiningChar, - Extender, + Extender, Sch, NameChar; @@ -139,7 +139,7 @@ private: bool my_parse( IStream & is, - const rule_t &rule_, + const rule_t &rule_, const CharType delimiter = L'>' ) const ; public: diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_iarchive.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_iarchive.ipp index 625458b9eb..f7490530e2 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_iarchive.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/basic_xml_iarchive.ipp @@ -37,7 +37,6 @@ basic_xml_iarchive<Archive>::load_start(const char *name){ } // don't check start tag at highest level ++depth; - return; } template<class Archive> diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/text_iarchive_impl.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/text_iarchive_impl.ipp index ae4e2750ce..a3a80c04de 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/text_iarchive_impl.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/text_iarchive_impl.ipp @@ -115,14 +115,7 @@ text_iarchive_impl<Archive>::text_iarchive_impl( 0 != (flags & no_codecvt) ), basic_text_iarchive<Archive>(flags) -{ - if(0 == (flags & no_header)) - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->init(); - #else - this->basic_text_iarchive<Archive>::init(); - #endif -} +{} } // namespace archive } // namespace boost diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/text_oarchive_impl.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/text_oarchive_impl.ipp index 37d8664a98..26fbc23adb 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/text_oarchive_impl.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/text_oarchive_impl.ipp @@ -93,12 +93,6 @@ text_oarchive_impl<Archive>::text_oarchive_impl( ), basic_text_oarchive<Archive>(flags) { - if(0 == (flags & no_header)) - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->init(); - #else - this->basic_text_oarchive<Archive>::init(); - #endif } template<class Archive> diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/text_wiarchive_impl.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/text_wiarchive_impl.ipp index e85625ac32..e421fa558d 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/text_wiarchive_impl.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/text_wiarchive_impl.ipp @@ -108,8 +108,6 @@ text_wiarchive_impl<Archive>::text_wiarchive_impl( ), basic_text_iarchive<Archive>(flags) { - if(0 == (flags & no_header)) - basic_text_iarchive<Archive>::init(); } } // archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_iarchive_impl.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_iarchive_impl.ipp index efc32e0163..b0847d4a1b 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_iarchive_impl.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_iarchive_impl.ipp @@ -11,7 +11,6 @@ #include <boost/config.hpp> #include <cstring> // memcpy #include <cstddef> // NULL -#include <exception> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -34,6 +33,7 @@ namespace std{ #include <boost/archive/dinkumware.hpp> #endif +#include <boost/core/uncaught_exceptions.hpp> #include <boost/core/no_exceptions_support.hpp> #include <boost/archive/xml_archive_exception.hpp> @@ -165,7 +165,7 @@ BOOST_ARCHIVE_DECL void xml_iarchive_impl<Archive>::init(){ gimpl->init(is); this->set_library_version( - library_version_type(gimpl->rv.version) + boost::serialization::library_version_type(gimpl->rv.version) ); } @@ -181,15 +181,12 @@ xml_iarchive_impl<Archive>::xml_iarchive_impl( ), basic_xml_iarchive<Archive>(flags), gimpl(new xml_grammar()) -{ - if(0 == (flags & no_header)) - init(); -} +{} template<class Archive> BOOST_ARCHIVE_DECL xml_iarchive_impl<Archive>::~xml_iarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)){ gimpl->windup(is); diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_oarchive_impl.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_oarchive_impl.ipp index 5ebd454e72..0f4ccbbf98 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_oarchive_impl.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_oarchive_impl.ipp @@ -10,7 +10,6 @@ #include <iomanip> #include <algorithm> // std::copy #include <string> -#include <exception> #include <cstring> // strlen #include <boost/config.hpp> // msvc 6.0 needs this to suppress warnings @@ -20,6 +19,7 @@ namespace std{ } // namespace std #endif +#include <boost/core/uncaught_exceptions.hpp> #include <boost/archive/iterators/xml_escape.hpp> #include <boost/archive/iterators/ostream_iterator.hpp> @@ -109,10 +109,7 @@ xml_oarchive_impl<Archive>::xml_oarchive_impl( 0 != (flags & no_codecvt) ), basic_xml_oarchive<Archive>(flags) -{ - if(0 == (flags & no_header)) - this->init(); -} +{} template<class Archive> BOOST_ARCHIVE_DECL void @@ -132,7 +129,7 @@ xml_oarchive_impl<Archive>::save_binary(const void *address, std::size_t count){ template<class Archive> BOOST_ARCHIVE_DECL xml_oarchive_impl<Archive>::~xml_oarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)) this->windup(); diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_wiarchive_impl.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_wiarchive_impl.ipp index f572b76220..198dfafb98 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_wiarchive_impl.ipp @@ -20,13 +20,13 @@ namespace std{ #include <boost/assert.hpp> #include <algorithm> // std::copy -#include <exception> // uncaught exception #include <boost/detail/workaround.hpp> // Dinkumware and RogueWave #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) #include <boost/archive/dinkumware.hpp> #endif #include <boost/io/ios_state.hpp> +#include <boost/core/uncaught_exceptions.hpp> #include <boost/core/no_exceptions_support.hpp> #include <boost/serialization/string.hpp> @@ -143,7 +143,7 @@ BOOST_WARCHIVE_DECL void xml_wiarchive_impl<Archive>::init(){ gimpl->init(is); this->set_library_version( - library_version_type(gimpl->rv.version) + boost::serialization::library_version_type(gimpl->rv.version) ); } @@ -169,14 +169,12 @@ xml_wiarchive_impl<Archive>::xml_wiarchive_impl( is_.sync(); is_.imbue(archive_locale); } - if(0 == (flags & no_header)) - init(); } template<class Archive> BOOST_WARCHIVE_DECL xml_wiarchive_impl<Archive>::~xml_wiarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)){ gimpl->windup(is); diff --git a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_woarchive_impl.ipp b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_woarchive_impl.ipp index 630898b86a..dabaf23062 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_woarchive_impl.ipp +++ b/contrib/restricted/boost/serialization/include/boost/archive/impl/xml_woarchive_impl.ipp @@ -13,7 +13,6 @@ #include <string> #include <algorithm> // std::copy #include <locale> -#include <exception> #include <cstring> // strlen #include <cstdlib> // mbtowc @@ -32,6 +31,8 @@ namespace std{ } // namespace std #endif +#include <boost/core/uncaught_exceptions.hpp> + #include <boost/archive/xml_woarchive.hpp> #include <boost/archive/detail/utf8_codecvt_facet.hpp> @@ -132,14 +133,12 @@ xml_woarchive_impl<Archive>::xml_woarchive_impl( os_.flush(); os_.imbue(archive_locale); } - if(0 == (flags & no_header)) - this->init(); } template<class Archive> BOOST_WARCHIVE_DECL xml_woarchive_impl<Archive>::~xml_woarchive_impl(){ - if(std::uncaught_exception()) + if(boost::core::uncaught_exceptions() > 0) return; if(0 == (this->get_flags() & no_header)){ os << L"</boost_serialization>"; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/base64_from_binary.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/base64_from_binary.hpp index ee84994439..bd0b38fa57 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/base64_from_binary.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/base64_from_binary.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // base64_from_binary.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -20,15 +20,15 @@ #include <cstddef> // size_t #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif #include <boost/iterator/transform_iterator.hpp> #include <boost/archive/iterators/dataflow_exception.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -68,10 +68,10 @@ struct from_6_bit { //template<class Base, class CharType = typename Base::value_type> template< - class Base, + class Base, class CharType = typename boost::iterator_value<Base>::type > -class base64_from_binary : +class base64_from_binary : public transform_iterator< detail::from_6_bit<CharType>, Base @@ -93,7 +93,7 @@ public: ) {} // intel 7.1 doesn't like default copy constructor - base64_from_binary(const base64_from_binary & rhs) : + base64_from_binary(const base64_from_binary & rhs) : super_t( Base(rhs.base_reference()), detail::from_6_bit<CharType>() diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/binary_from_base64.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/binary_from_base64.hpp index 89b8f889da..5aeccb3aab 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/binary_from_base64.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/binary_from_base64.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // binary_from_base64.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -24,7 +24,7 @@ #include <boost/iterator/transform_iterator.hpp> #include <boost/archive/iterators/dataflow_exception.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -78,7 +78,7 @@ struct to_6_bit { // ideal. This is also addressed here. template< - class Base, + class Base, class CharType = typename boost::iterator_value<Base>::type > class binary_from_base64 : public @@ -102,7 +102,7 @@ public: ) {} // intel 7.1 doesn't like default copy constructor - binary_from_base64(const binary_from_base64 & rhs) : + binary_from_base64(const binary_from_base64 & rhs) : super_t( Base(rhs.base_reference()), detail::to_6_bit<CharType>() diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/dataflow_exception.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/dataflow_exception.hpp index c3138aac7e..3d5302cd4c 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/dataflow_exception.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/dataflow_exception.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // dataflow_exception.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -46,7 +46,7 @@ public: dataflow_exception(exception_code c = other_exception) : code(c) {} - virtual const char *what( ) const noexcept + const char *what( ) const noexcept BOOST_OVERRIDE { const char *msg = "unknown exception code"; switch(code){ diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/escape.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/escape.hpp index 103b31e0fe..9af34ac9d1 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/escape.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/escape.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // escape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -22,7 +22,7 @@ #include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/iterator_traits.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -30,10 +30,10 @@ namespace iterators { // insert escapes into text template<class Derived, class Base> -class escape : +class escape : public boost::iterator_adaptor< - Derived, - Base, + Derived, + Base, typename boost::iterator_value<Base>::type, single_pass_traversal_tag, typename boost::iterator_value<Base>::type @@ -44,8 +44,8 @@ class escape : friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - Derived, - Base, + Derived, + Base, base_value_type, single_pass_traversal_tag, base_value_type @@ -58,7 +58,7 @@ class escape : m_full = true; } - //Access the value referred to + //Access the value referred to reference_type dereference() const { if(!m_full) const_cast<this_t *>(this)->dereference_impl(); @@ -98,7 +98,7 @@ class escape : bool m_full; base_value_type m_current_value; public: - escape(Base base) : + escape(Base base) : super_t(base), m_bnext(NULL), m_bend(NULL), diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/insert_linebreaks.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/insert_linebreaks.hpp index 2504b030db..c75ea8415c 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/insert_linebreaks.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/insert_linebreaks.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // insert_linebreaks.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -26,18 +26,18 @@ namespace std{ using ::memcpy; } #include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/iterator_traits.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // insert line break every N characters template< - class Base, - int N, + class Base, + int N, class CharType = typename boost::iterator_value<Base>::type > -class insert_linebreaks : +class insert_linebreaks : public iterator_adaptor< insert_linebreaks<Base, N, CharType>, Base, @@ -86,7 +86,7 @@ public: m_count(0) {} // intel 7.1 doesn't like default copy constructor - insert_linebreaks(const insert_linebreaks & rhs) : + insert_linebreaks(const insert_linebreaks & rhs) : super_t(rhs.base_reference()), m_count(rhs.m_count) {} diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/istream_iterator.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/istream_iterator.hpp index a187f605e6..05b87996bd 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/istream_iterator.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/istream_iterator.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // istream_iterator.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -25,13 +25,13 @@ #include <istream> #include <boost/iterator/iterator_facade.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { // given a type, make an input iterator based on a pointer to that type template<class Elem = char> -class istream_iterator : +class istream_iterator : public boost::iterator_facade< istream_iterator<Elem>, Elem, @@ -48,13 +48,13 @@ class istream_iterator : Elem > super_t; typedef typename std::basic_istream<Elem> istream_type; - + bool equal(const this_t & rhs) const { // note: only works for comparison against end of stream return m_istream == rhs.m_istream; } - //Access the value referred to + //Access the value referred to Elem dereference() const { return static_cast<Elem>(m_istream->peek()); } diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/mb_from_wchar.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/mb_from_wchar.hpp index eb30480cc0..dbd17b7c76 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/mb_from_wchar.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/mb_from_wchar.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // mb_from_wchar.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -23,7 +23,7 @@ #endif #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ using ::mbstate_t; } // namespace std #endif @@ -31,7 +31,7 @@ namespace std{ #include <boost/archive/detail/utf8_codecvt_facet.hpp> #include <boost/iterator/iterator_adaptor.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -41,8 +41,8 @@ namespace iterators { template<class Base> // the input iterator class mb_from_wchar : public boost::iterator_adaptor< - mb_from_wchar<Base>, - Base, + mb_from_wchar<Base>, + Base, wchar_t, single_pass_traversal_tag, char @@ -51,8 +51,8 @@ class mb_from_wchar friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - mb_from_wchar<Base>, - Base, + mb_from_wchar<Base>, + Base, wchar_t, single_pass_traversal_tag, char @@ -75,7 +75,7 @@ class mb_from_wchar bool equal(const mb_from_wchar<Base> & rhs) const { // once the value is filled, the base_reference has been incremented // so don't permit comparison anymore. - return + return 0 == m_bend && 0 == m_bnext && this->base_reference() == rhs.base_reference() @@ -102,7 +102,7 @@ class mb_from_wchar void increment(){ if(++m_bnext < m_bend) return; - m_bend = + m_bend = m_bnext = 0; ++(this->base_reference()); m_full = false; @@ -127,7 +127,7 @@ public: m_full(false) {} // intel 7.1 doesn't like default copy constructor - mb_from_wchar(const mb_from_wchar & rhs) : + mb_from_wchar(const mb_from_wchar & rhs) : super_t(rhs.base_reference()), m_bend(rhs.m_bend), m_bnext(rhs.m_bnext), diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/ostream_iterator.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/ostream_iterator.hpp index 49a9b99034..80b5d1d456 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/ostream_iterator.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/ostream_iterator.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // ostream_iterator.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -24,13 +24,13 @@ #include <ostream> #include <boost/iterator/iterator_facade.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { // given a type, make an input iterator based on a pointer to that type template<class Elem> -class ostream_iterator : +class ostream_iterator : public boost::iterator_facade< ostream_iterator<Elem>, Elem, @@ -43,7 +43,7 @@ class ostream_iterator : typedef Elem char_type; typedef std::basic_ostream<char_type> ostream_type; - //emulate the behavior of std::ostream + //emulate the behavior of std::ostream ostream_iterator & dereference() const { return const_cast<ostream_iterator &>(*this); } diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/remove_whitespace.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/remove_whitespace.hpp index c3580ab258..eb756f3799 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/remove_whitespace.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/remove_whitespace.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // remove_whitespace.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -25,7 +25,7 @@ // here is the default standard implementation of the functor used // by the filter iterator to remove spaces. Unfortunately usage // of this implementation in combination with spirit trips a bug -// VC 6.5. The only way I can find to work around it is to +// VC 6.5. The only way I can find to work around it is to // implement a special non-standard version for this platform #ifndef BOOST_NO_CWCTYPE @@ -74,7 +74,7 @@ struct remove_whitespace_predicate<wchar_t> /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // convert base64 file data (including whitespace and padding) to binary -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -122,15 +122,15 @@ public: m_full = false; ++(this->base_reference()); } - filter_iterator(Base start) : - super_t(start), + filter_iterator(Base start) : + super_t(start), m_full(false) {} filter_iterator(){} }; template<class Base> -class remove_whitespace : +class remove_whitespace : public filter_iterator< remove_whitespace_predicate< typename boost::iterator_value<Base>::type @@ -155,7 +155,7 @@ public: super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor - remove_whitespace(const remove_whitespace & rhs) : + remove_whitespace(const remove_whitespace & rhs) : super_t(rhs.base_reference()) {} }; diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/transform_width.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/transform_width.hpp index 09c050a927..162dccfa96 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/transform_width.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/transform_width.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // transform_width.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -29,7 +29,7 @@ #include <algorithm> // std::min -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -37,12 +37,12 @@ namespace iterators { // class used by text archives to translate char strings to wchar_t // strings of the currently selected locale template< - class Base, - int BitsOut, - int BitsIn, + class Base, + int BitsOut, + int BitsIn, class CharType = typename boost::iterator_value<Base>::type // output character > -class transform_width : +class transform_width : public boost::iterator_adaptor< transform_width<Base, BitsOut, BitsIn, CharType>, Base, @@ -108,19 +108,19 @@ class transform_width : public: // make composible buy using templated constructor template<class T> - transform_width(T start) : + 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 + // To disable GCC warning, but not truly necessary + //(m_buffer_in will be initialized later before being //used because m_remaining_bits == 0) - m_buffer_in(0), + m_buffer_in(0), m_remaining_bits(0), m_end_of_sequence(false) {} // intel 7.1 doesn't like default copy constructor - transform_width(const transform_width & rhs) : + transform_width(const transform_width & rhs) : super_t(rhs.base_reference()), m_buffer_out_full(rhs.m_buffer_out_full), m_buffer_out(rhs.m_buffer_out), @@ -131,9 +131,9 @@ public: }; template< - class Base, - int BitsOut, - int BitsIn, + class Base, + int BitsOut, + int BitsIn, class CharType > void transform_width<Base, BitsOut, BitsIn, CharType>::fill() { diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/unescape.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/unescape.hpp index abf6240608..6753c64461 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/unescape.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/unescape.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // unescape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -21,7 +21,7 @@ #include <boost/iterator/iterator_adaptor.hpp> #include <boost/pointee.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -29,10 +29,10 @@ namespace iterators { // class used by text archives to translate char strings to wchar_t // strings of the currently selected locale template<class Derived, class Base> -class unescape +class unescape : public boost::iterator_adaptor< unescape<Derived, Base>, - Base, + Base, typename pointee<Base>::type, single_pass_traversal_tag, typename pointee<Base>::type @@ -40,8 +40,8 @@ class unescape { friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - unescape<Derived, Base>, - Base, + unescape<Derived, Base>, + Base, typename pointee<Base>::type, single_pass_traversal_tag, typename pointee<Base>::type @@ -71,11 +71,11 @@ private: ++(this->base_reference()); dereference_impl(); m_full = false; - }; + } public: - unescape(Base base) : + unescape(Base base) : super_t(base), m_full(false) {} diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/wchar_from_mb.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/wchar_from_mb.hpp index 2af8f6401f..6067245d3f 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/wchar_from_mb.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/wchar_from_mb.hpp @@ -9,14 +9,13 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // wchar_from_mb.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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. -#include <boost/assert.hpp> #include <cctype> #include <cstddef> // size_t #ifndef BOOST_NO_CWCHAR @@ -26,10 +25,12 @@ #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ +namespace std{ using ::mbstate_t; } // namespace std #endif +#include <boost/assert.hpp> +#include <boost/core/ignore_unused.hpp> #include <boost/array.hpp> #include <boost/iterator/iterator_adaptor.hpp> #include <boost/archive/detail/utf8_codecvt_facet.hpp> @@ -38,7 +39,7 @@ namespace std{ #include <iostream> -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -46,10 +47,10 @@ namespace iterators { // class used by text archives to translate char strings to wchar_t // strings of the currently selected locale template<class Base> -class wchar_from_mb +class wchar_from_mb : public boost::iterator_adaptor< - wchar_from_mb<Base>, - Base, + wchar_from_mb<Base>, + Base, wchar_t, single_pass_traversal_tag, wchar_t @@ -57,8 +58,8 @@ class wchar_from_mb { friend class boost::iterator_core_access; typedef typename boost::iterator_adaptor< - wchar_from_mb<Base>, - Base, + wchar_from_mb<Base>, + Base, wchar_t, single_pass_traversal_tag, wchar_t @@ -125,7 +126,7 @@ class wchar_from_mb public: // make composible buy using templated constructor template<class T> - wchar_from_mb(T start) : + wchar_from_mb(T start) : super_t(Base(static_cast< T >(start))), m_mbs(std::mbstate_t()) { @@ -165,6 +166,7 @@ void wchar_from_mb<Base>::drain(){ const typename boost::iterators::iterator_value<Base>::type * input_new_start; typename iterator_value<this_t>::type * next_available; + BOOST_ATTRIBUTE_UNUSED // redundant with ignore_unused below but clarifies intention std::codecvt_base::result r = m_codecvt_facet.in( m_mbs, m_input.m_buffer.begin(), diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_escape.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_escape.hpp index c838a73b86..c45733ea19 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_escape.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_escape.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_escape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -19,7 +19,7 @@ #include <boost/assert.hpp> #include <boost/archive/iterators/escape.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { @@ -27,7 +27,7 @@ namespace iterators { // insert escapes into xml text template<class Base> -class xml_escape +class xml_escape : public escape<xml_escape<Base>, Base> { friend class boost::iterator_core_access; @@ -43,14 +43,14 @@ public: super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor - xml_escape(const xml_escape & rhs) : + xml_escape(const xml_escape & rhs) : super_t(rhs.base_reference()) {} }; template<class Base> char xml_escape<Base>::fill( - const char * & bstart, + const char * & bstart, const char * & bend ){ char current_value = * this->base_reference(); @@ -83,7 +83,7 @@ char xml_escape<Base>::fill( template<class Base> wchar_t xml_escape<Base>::fill( - const wchar_t * & bstart, + const wchar_t * & bstart, const wchar_t * & bend ){ wchar_t current_value = * this->base_reference(); diff --git a/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_unescape.hpp b/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_unescape.hpp index 6997740456..7fc9fd5f6f 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_unescape.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/iterators/xml_unescape.hpp @@ -9,13 +9,15 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_unescape.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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. +#include <boost/config.hpp> +#include <boost/detail/workaround.hpp> #include <boost/assert.hpp> #include <boost/serialization/throw_exception.hpp> @@ -23,14 +25,14 @@ #include <boost/archive/iterators/unescape.hpp> #include <boost/archive/iterators/dataflow_exception.hpp> -namespace boost { +namespace boost { namespace archive { namespace iterators { /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // replace &??? xml escape sequences with the corresponding characters template<class Base> -class xml_unescape +class xml_unescape : public unescape<xml_unescape<Base>, Base> { friend class boost::iterator_core_access; @@ -42,22 +44,22 @@ class xml_unescape return unescape<xml_unescape<Base>, Base>::dereference(); } public: - // workaround msvc 7.1 ICU crash - #if defined(BOOST_MSVC) + // msvc versions prior to 14.0 crash with and ICE + #if BOOST_WORKAROUND(BOOST_MSVC, < 1900) typedef int value_type; #else - typedef typename this_t::value_type value_type; + typedef typename super_t::value_type value_type; #endif void drain_residue(const char *literal); value_type drain(); template<class T> - xml_unescape(T start) : + xml_unescape(T start) : super_t(Base(static_cast< T >(start))) {} // intel 7.1 doesn't like default copy constructor - xml_unescape(const xml_unescape & rhs) : + xml_unescape(const xml_unescape & rhs) : super_t(rhs.base_reference()) {} }; @@ -80,8 +82,8 @@ void xml_unescape<Base>::drain_residue(const char * literal){ // iterator refenence which would make subsequent iterator comparisons // incorrect and thereby break the composiblity of iterators. template<class Base> -typename xml_unescape<Base>::value_type -//int +typename xml_unescape<Base>::value_type +//int xml_unescape<Base>::drain(){ value_type retval = * this->base_reference(); if('&' != retval){ diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_binary_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_binary_iarchive.hpp new file mode 100644 index 0000000000..c1af77a3aa --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_binary_iarchive.hpp @@ -0,0 +1,53 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_iarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#include <boost/archive/binary_iarchive.hpp> +#include <boost/archive/detail/polymorphic_iarchive_route.hpp> + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_binary_iarchive : + public detail::polymorphic_iarchive_route<binary_iarchive> +{ +public: + polymorphic_binary_iarchive(std::istream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route<binary_iarchive>(is, flags) + {} + ~polymorphic_binary_iarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_binary_iarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_binary_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_binary_oarchive.hpp new file mode 100644 index 0000000000..e9282484a2 --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_binary_oarchive.hpp @@ -0,0 +1,44 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_binary_oarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#include <boost/archive/binary_oarchive.hpp> +#include <boost/archive/detail/polymorphic_oarchive_route.hpp> + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_binary_oarchive : + public detail::polymorphic_oarchive_route<binary_oarchive> +{ +public: + polymorphic_binary_oarchive(std::ostream & os, unsigned int flags = 0) : + detail::polymorphic_oarchive_route<binary_oarchive>(os, flags) + {} + ~polymorphic_binary_oarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_binary_oarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_iarchive.hpp index d3c59a9f0f..ade9e5daa3 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_iarchive.hpp @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <cstddef> // std::size_t -#include <climits> // ULONG_MAX +#include <climits> // ULONG_MAX #include <string> #include <boost/config.hpp> @@ -31,6 +31,7 @@ namespace std{ #include <boost/archive/detail/iserializer.hpp> #include <boost/archive/detail/interface_iarchive.hpp> +#include <boost/serialization/library_version_type.hpp> #include <boost/serialization/nvp.hpp> #include <boost/archive/detail/register_archive.hpp> @@ -116,11 +117,13 @@ public: load_end(t.name()); } protected: - virtual ~polymorphic_iarchive_impl(){}; + virtual ~polymorphic_iarchive_impl() {} public: // utility function implemented by all legal archives - virtual void set_library_version(library_version_type archive_library_version) = 0; - virtual library_version_type get_library_version() const = 0; + virtual void set_library_version( + boost::serialization::library_version_type archive_library_version + ) = 0; + virtual boost::serialization::library_version_type get_library_version() const = 0; virtual unsigned int get_flags() const = 0; virtual void delete_created_pointers() = 0; virtual void reset_object_address( @@ -156,7 +159,7 @@ class BOOST_SYMBOL_VISIBLE polymorphic_iarchive : public polymorphic_iarchive_impl { public: - virtual ~polymorphic_iarchive(){}; + ~polymorphic_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_oarchive.hpp index edac4edb1e..c81461052b 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_oarchive.hpp @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. #include <cstddef> // size_t -#include <climits> // ULONG_MAX +#include <climits> // ULONG_MAX #include <string> #include <boost/config.hpp> @@ -118,11 +118,11 @@ public: save_end(t.name()); } protected: - virtual ~polymorphic_oarchive_impl(){}; + virtual ~polymorphic_oarchive_impl() {} public: // utility functions implemented by all legal archives virtual unsigned int get_flags() const = 0; - virtual library_version_type get_library_version() const = 0; + virtual boost::serialization::library_version_type get_library_version() const = 0; virtual void save_binary(const void * t, std::size_t size) = 0; virtual void save_object( @@ -136,11 +136,11 @@ public: }; // note: preserve naming symmetry -class BOOST_SYMBOL_VISIBLE polymorphic_oarchive : +class BOOST_SYMBOL_VISIBLE polymorphic_oarchive : public polymorphic_oarchive_impl { public: - virtual ~polymorphic_oarchive(){}; + ~polymorphic_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_iarchive.hpp new file mode 100644 index 0000000000..790d8def9c --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_iarchive.hpp @@ -0,0 +1,53 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_iarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#include <boost/archive/text_iarchive.hpp> +#include <boost/archive/detail/polymorphic_iarchive_route.hpp> + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_text_iarchive : + public detail::polymorphic_iarchive_route<text_iarchive> +{ +public: + polymorphic_text_iarchive(std::istream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route<text_iarchive>(is, flags) + {} + ~polymorphic_text_iarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_iarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_oarchive.hpp new file mode 100644 index 0000000000..82b3ed782d --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_oarchive.hpp @@ -0,0 +1,44 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_oarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#include <boost/archive/text_oarchive.hpp> +#include <boost/archive/detail/polymorphic_oarchive_route.hpp> + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_text_oarchive : + public detail::polymorphic_oarchive_route<text_oarchive> +{ +public: + polymorphic_text_oarchive(std::ostream & os, unsigned int flags = 0) : + detail::polymorphic_oarchive_route<text_oarchive>(os, flags) + {} + ~polymorphic_text_oarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_oarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_wiarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_wiarchive.hpp new file mode 100644 index 0000000000..b32d53344e --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_wiarchive.hpp @@ -0,0 +1,58 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_wiarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include <boost/archive/text_wiarchive.hpp> +#include <boost/archive/detail/polymorphic_iarchive_route.hpp> + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_text_wiarchive : + public detail::polymorphic_iarchive_route<text_wiarchive> +{ +public: + polymorphic_text_wiarchive(std::wistream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route<text_wiarchive>(is, flags) + {} + ~polymorphic_text_wiarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_wiarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_woarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_woarchive.hpp new file mode 100644 index 0000000000..4e0f5ea4b9 --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_text_woarchive.hpp @@ -0,0 +1,49 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_text_oarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include <boost/archive/text_woarchive.hpp> +#include <boost/archive/detail/polymorphic_oarchive_route.hpp> + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_text_woarchive : + public detail::polymorphic_oarchive_route<text_woarchive> +{ +public: + polymorphic_text_woarchive(std::wostream & os, unsigned int flags = 0) : + detail::polymorphic_oarchive_route<text_woarchive>(os, flags) + {} + ~polymorphic_text_woarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_text_woarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_iarchive.hpp new file mode 100644 index 0000000000..f8ddaf9602 --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_iarchive.hpp @@ -0,0 +1,53 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_iarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#include <boost/archive/xml_iarchive.hpp> +#include <boost/archive/detail/polymorphic_iarchive_route.hpp> + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable : 4511 4512) +#endif + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_xml_iarchive : + public detail::polymorphic_iarchive_route<xml_iarchive> +{ +public: + polymorphic_xml_iarchive(std::istream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route<xml_iarchive>(is, flags) + {} + ~polymorphic_xml_iarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_iarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_oarchive.hpp new file mode 100644 index 0000000000..08324e50df --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_oarchive.hpp @@ -0,0 +1,43 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_oarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#include <boost/archive/xml_oarchive.hpp> +#include <boost/archive/detail/polymorphic_oarchive_route.hpp> + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_xml_oarchive : + public detail::polymorphic_oarchive_route<xml_oarchive> +{ +public: + polymorphic_xml_oarchive(std::ostream & os, unsigned int flags = 0) : + detail::polymorphic_oarchive_route<xml_oarchive>(os, flags) + {} + ~polymorphic_xml_oarchive() BOOST_OVERRIDE {} +}; +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_oarchive +) + +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_wiarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_wiarchive.hpp new file mode 100644 index 0000000000..5b32532971 --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_wiarchive.hpp @@ -0,0 +1,49 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_wiarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include <boost/archive/xml_wiarchive.hpp> +#include <boost/archive/detail/polymorphic_iarchive_route.hpp> + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_xml_wiarchive : + public detail::polymorphic_iarchive_route<xml_wiarchive> +{ +public: + polymorphic_xml_wiarchive(std::wistream & is, unsigned int flags = 0) : + detail::polymorphic_iarchive_route<xml_wiarchive>(is, flags) + {} + ~polymorphic_xml_wiarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_wiarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_woarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_woarchive.hpp new file mode 100644 index 0000000000..f7a3349f5c --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/archive/polymorphic_xml_woarchive.hpp @@ -0,0 +1,49 @@ +#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP +#define BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// polymorphic_xml_woarchive.hpp + +// (C) Copyright 2002 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. + +#include <boost/config.hpp> +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#else + +#include <boost/archive/xml_woarchive.hpp> +#include <boost/archive/detail/polymorphic_oarchive_route.hpp> + +namespace boost { +namespace archive { + +class BOOST_SYMBOL_VISIBLE polymorphic_xml_woarchive : + public detail::polymorphic_oarchive_route<xml_woarchive> +{ +public: + polymorphic_xml_woarchive(std::wostream & os, unsigned int flags = 0) : + detail::polymorphic_oarchive_route<xml_woarchive>(os, flags) + {} + ~polymorphic_xml_woarchive() BOOST_OVERRIDE {} +}; + +} // namespace archive +} // namespace boost + +// required by export +BOOST_SERIALIZATION_REGISTER_ARCHIVE( + boost::archive::polymorphic_xml_woarchive +) + +#endif // BOOST_NO_STD_WSTREAMBUF +#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/archive/text_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/text_iarchive.hpp index d9d60adf0b..73fc39f5f8 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/text_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/text_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -32,7 +32,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -65,16 +65,16 @@ protected: load(v); t = boost::serialization::item_version_type(v); } - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(wchar_t * t); #endif - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void load(std::wstring &ws); #endif template<class T> @@ -85,11 +85,11 @@ protected: load_override(class_name_type & t); BOOST_ARCHIVE_DECL void init(); - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL text_iarchive_impl(std::istream & is, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL - ~text_iarchive_impl(){}; + //BOOST_ARCHIVE_DECL + ~text_iarchive_impl() BOOST_OVERRIDE {} }; } // namespace archive @@ -106,17 +106,20 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE text_iarchive : +class BOOST_SYMBOL_VISIBLE text_iarchive : public text_iarchive_impl<text_iarchive>{ public: text_iarchive(std::istream & is_, unsigned int flags = 0) : // note: added _ to suppress useless gcc warning text_iarchive_impl<text_iarchive>(is_, flags) - {} - ~text_iarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/text_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/text_oarchive.hpp index 9ba0dafffb..f94f876d7a 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/text_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/text_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -21,8 +21,8 @@ #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -39,7 +39,7 @@ namespace std{ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -65,45 +65,48 @@ protected: basic_text_oprimitive<std::ostream>::save(t); } void save(const version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } void save(const boost::serialization::item_version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL text_oarchive_impl(std::ostream & os, unsigned int flags); // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL - ~text_oarchive_impl(){}; + //BOOST_ARCHIVE_DECL + ~text_oarchive_impl() BOOST_OVERRIDE {} public: - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save_binary(const void *address, std::size_t count); }; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from text_oarchive_impl instead. This will +// via inheritance, derived from text_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE text_oarchive : +class BOOST_SYMBOL_VISIBLE text_oarchive : public text_oarchive_impl<text_oarchive> { public: text_oarchive(std::ostream & os_, unsigned int flags = 0) : // note: added _ to suppress useless gcc warning text_oarchive_impl<text_oarchive>(os_, flags) - {} - ~text_oarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/text_wiarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/text_wiarchive.hpp index 3adf068a51..5daf52f51e 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/text_wiarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/text_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -36,7 +36,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -92,9 +92,9 @@ protected: void load_override(T & t){ basic_text_iarchive<Archive>::load_override(t); } - BOOST_WARCHIVE_DECL + BOOST_WARCHIVE_DECL text_wiarchive_impl(std::wistream & is, unsigned int flags); - ~text_wiarchive_impl(){}; + ~text_wiarchive_impl() BOOST_OVERRIDE {} }; } // namespace archive @@ -111,16 +111,19 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE text_wiarchive : +class BOOST_SYMBOL_VISIBLE text_wiarchive : public text_wiarchive_impl<text_wiarchive>{ public: text_wiarchive(std::wistream & is, unsigned int flags = 0) : text_wiarchive_impl<text_wiarchive>(is, flags) - {} - ~text_wiarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_wiarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/text_woarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/text_woarchive.hpp index b6b4f8ed59..713d89fc01 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/text_woarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/text_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // text_woarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -26,8 +26,8 @@ #include <cstddef> // size_t #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -44,7 +44,7 @@ namespace std{ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -78,10 +78,10 @@ protected: basic_text_oprimitive<std::wostream>::save(t); } void save(const version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } void save(const boost::serialization::item_version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } BOOST_WARCHIVE_DECL void save(const char * t); @@ -97,14 +97,11 @@ protected: #endif text_woarchive_impl(std::wostream & os, unsigned int flags) : basic_text_oprimitive<std::wostream>( - os, + os, 0 != (flags & no_codecvt) ), basic_text_oarchive<Archive>(flags) - { - if(0 == (flags & no_header)) - basic_text_oarchive<Archive>::init(); - } + {} public: void save_binary(const void *address, std::size_t count){ put(static_cast<wchar_t>('\n')); @@ -114,7 +111,7 @@ public: #else this->basic_text_oprimitive::save_binary( #endif - address, + address, count ); put(static_cast<wchar_t>('\n')); @@ -127,16 +124,19 @@ public: // typedef text_oarchive_impl<text_oarchive_impl<...> > text_oarchive; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from text_oarchive_impl instead. This will +// via inheritance, derived from text_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE text_woarchive : +class BOOST_SYMBOL_VISIBLE text_woarchive : public text_woarchive_impl<text_woarchive> { public: text_woarchive(std::wostream & os, unsigned int flags = 0) : text_woarchive_impl<text_woarchive>(os, flags) - {} - ~text_woarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~text_woarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/wcslen.hpp b/contrib/restricted/boost/serialization/include/boost/archive/wcslen.hpp index 0b60004f09..6138c3e4f9 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/wcslen.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/wcslen.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // wcslen.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -19,8 +19,8 @@ #include <cstddef> // size_t #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -30,7 +30,7 @@ namespace std{ // wcslen #if defined(BOOST_DINKUMWARE_STDLIB) && BOOST_DINKUMWARE_STDLIB < 306 \ -|| defined(__LIBCOMO__) +|| defined(__LIBCOMO__) namespace std { inline std::size_t wcslen(const wchar_t * ws) diff --git a/contrib/restricted/boost/serialization/include/boost/archive/xml_archive_exception.hpp b/contrib/restricted/boost/serialization/include/boost/archive/xml_archive_exception.hpp index 82c53ef5d3..1852d4284d 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/xml_archive_exception.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/xml_archive_exception.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_archive_exception.hpp: -// (C) Copyright 2007 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2007 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) @@ -19,7 +19,7 @@ #include <exception> #include <boost/assert.hpp> -#include <boost/config.hpp> +#include <boost/config.hpp> #include <boost/archive/detail/decl.hpp> #include <boost/archive/archive_exception.hpp> @@ -31,7 +31,7 @@ namespace archive { ////////////////////////////////////////////////////////////////////// // exceptions thrown by xml archives // -class BOOST_SYMBOL_VISIBLE xml_archive_exception : +class BOOST_SYMBOL_VISIBLE xml_archive_exception : public virtual boost::archive::archive_exception { public: @@ -41,12 +41,12 @@ public: xml_archive_tag_name_error } exception_code; BOOST_ARCHIVE_DECL xml_archive_exception( - exception_code c, + exception_code c, const char * e1 = NULL, const char * e2 = NULL ); - BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &) ; - virtual BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; + BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &); + BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE; }; }// namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/xml_iarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/xml_iarchive.hpp index abd2f9fc4e..2d04edcb4a 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/xml_iarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/xml_iarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_iarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -32,7 +32,7 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { namespace detail { @@ -44,7 +44,7 @@ class basic_xml_grammar; typedef basic_xml_grammar<char> xml_grammar; template<class Archive> -class BOOST_SYMBOL_VISIBLE xml_iarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_iarchive_impl : public basic_text_iprimitive<std::istream>, public basic_xml_iarchive<Archive> { @@ -66,13 +66,13 @@ protected: void load(T & t){ basic_text_iprimitive<std::istream>::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -98,10 +98,10 @@ protected: load_override(class_name_type & t); BOOST_ARCHIVE_DECL void init(); - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL xml_iarchive_impl(std::istream & is, unsigned int flags); BOOST_ARCHIVE_DECL - ~xml_iarchive_impl(); + ~xml_iarchive_impl() BOOST_OVERRIDE; }; } // namespace archive @@ -117,16 +117,19 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { -class BOOST_SYMBOL_VISIBLE xml_iarchive : +class BOOST_SYMBOL_VISIBLE xml_iarchive : public xml_iarchive_impl<xml_iarchive>{ public: xml_iarchive(std::istream & is, unsigned int flags = 0) : xml_iarchive_impl<xml_iarchive>(is, flags) - {} - ~xml_iarchive(){}; + { + if(0 == (flags & no_header)) + init(); + } + ~xml_iarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/xml_oarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/xml_oarchive.hpp index eea1268037..84871b2d5f 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/xml_oarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/xml_oarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_oarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -21,8 +21,8 @@ #include <cstddef> // size_t #include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -47,7 +47,7 @@ namespace detail { } // namespace detail template<class Archive> -class BOOST_SYMBOL_VISIBLE xml_oarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_oarchive_impl : public basic_text_oprimitive<std::ostream>, public basic_xml_oarchive<Archive> { @@ -63,15 +63,15 @@ protected: void save(const T & t){ basic_text_oprimitive<std::ostream>::save(t); } - void + void save(const version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } - void + void save(const boost::serialization::item_version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } - BOOST_ARCHIVE_DECL void + BOOST_ARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T BOOST_ARCHIVE_DECL void @@ -83,10 +83,10 @@ protected: BOOST_ARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_ARCHIVE_DECL + BOOST_ARCHIVE_DECL xml_oarchive_impl(std::ostream & os, unsigned int flags); - BOOST_ARCHIVE_DECL - ~xml_oarchive_impl(); + BOOST_ARCHIVE_DECL + ~xml_oarchive_impl() BOOST_OVERRIDE; public: BOOST_ARCHIVE_DECL void save_binary(const void *address, std::size_t count); @@ -105,23 +105,26 @@ public: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { // we use the following because we can't use // typedef xml_oarchive_impl<xml_oarchive_impl<...> > xml_oarchive; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from xml_oarchive_impl instead. This will +// via inheritance, derived from xml_oarchive_impl instead. This will // preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE xml_oarchive : +class BOOST_SYMBOL_VISIBLE xml_oarchive : public xml_oarchive_impl<xml_oarchive> { public: xml_oarchive(std::ostream & os, unsigned int flags = 0) : xml_oarchive_impl<xml_oarchive>(os, flags) - {} - ~xml_oarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~xml_oarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/xml_wiarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/xml_wiarchive.hpp index 2ca3e5595e..e496621c75 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/xml_wiarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/xml_wiarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_wiarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -29,7 +29,6 @@ #include <boost/archive/basic_xml_iarchive.hpp> #include <boost/archive/detail/register_archive.hpp> #include <boost/serialization/item_version_type.hpp> -// #include <boost/archive/detail/utf8_codecvt_facet.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header @@ -50,7 +49,7 @@ class basic_xml_grammar; typedef basic_xml_grammar<wchar_t> xml_wgrammar; template<class Archive> -class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl : +class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl : public basic_text_iprimitive<std::wistream>, public basic_xml_iarchive<Archive> { @@ -68,17 +67,17 @@ protected: return is; } template<class T> - void + void load(T & t){ basic_text_iprimitive<std::wistream>::load(t); } - void + void load(version_type & t){ unsigned int v; load(v); t = version_type(v); } - void + void load(boost::serialization::item_version_type & t){ unsigned int v; load(v); @@ -102,19 +101,19 @@ protected: } BOOST_WARCHIVE_DECL void load_override(class_name_type & t); - BOOST_WARCHIVE_DECL void + BOOST_WARCHIVE_DECL void init(); - BOOST_WARCHIVE_DECL - xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; - BOOST_WARCHIVE_DECL - ~xml_wiarchive_impl(); + BOOST_WARCHIVE_DECL + xml_wiarchive_impl(std::wistream & is, unsigned int flags); + BOOST_WARCHIVE_DECL + ~xml_wiarchive_impl() BOOST_OVERRIDE; }; } // namespace archive } // namespace boost #ifdef BOOST_MSVC -# pragma warning(pop) +# pragma warning(pop) #endif #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas @@ -124,7 +123,7 @@ protected: # pragma warning(disable : 4511 4512) #endif -namespace boost { +namespace boost { namespace archive { class BOOST_SYMBOL_VISIBLE xml_wiarchive : @@ -132,8 +131,11 @@ class BOOST_SYMBOL_VISIBLE xml_wiarchive : public: xml_wiarchive(std::wistream & is, unsigned int flags = 0) : xml_wiarchive_impl<xml_wiarchive>(is, flags) - {} - ~xml_wiarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~xml_wiarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/archive/xml_woarchive.hpp b/contrib/restricted/boost/serialization/include/boost/archive/xml_woarchive.hpp index cb7ce68cb6..9f4a4c8ee1 100644 --- a/contrib/restricted/boost/serialization/include/boost/archive/xml_woarchive.hpp +++ b/contrib/restricted/boost/serialization/include/boost/archive/xml_woarchive.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // xml_woarchive.hpp -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -22,20 +22,18 @@ #else #include <cstddef> // size_t #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif #include <ostream> -//#include <boost/smart_ptr/scoped_ptr.hpp> #include <boost/archive/detail/auto_link_warchive.hpp> #include <boost/archive/basic_text_oprimitive.hpp> #include <boost/archive/basic_xml_oarchive.hpp> #include <boost/archive/detail/register_archive.hpp> #include <boost/serialization/item_version_type.hpp> -//#include <boost/archive/detail/utf8_codecvt_facet.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header @@ -74,28 +72,28 @@ protected: } void save(const version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } - void + void save(const boost::serialization::item_version_type & t){ - save(static_cast<const unsigned int>(t)); + save(static_cast<unsigned int>(t)); } BOOST_WARCHIVE_DECL void save(const char * t); #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL void + BOOST_WARCHIVE_DECL void save(const wchar_t * t); #endif - BOOST_WARCHIVE_DECL void + BOOST_WARCHIVE_DECL void save(const std::string &s); #ifndef BOOST_NO_STD_WSTRING BOOST_WARCHIVE_DECL void save(const std::wstring &ws); #endif - BOOST_WARCHIVE_DECL + BOOST_WARCHIVE_DECL xml_woarchive_impl(std::wostream & os, unsigned int flags); BOOST_WARCHIVE_DECL - ~xml_woarchive_impl(); + ~xml_woarchive_impl() BOOST_OVERRIDE; public: BOOST_WARCHIVE_DECL void save_binary(const void *address, std::size_t count); @@ -106,7 +104,7 @@ public: // typedef xml_woarchive_impl<xml_woarchive_impl<...> > xml_woarchive; // do not derive from this class. If you want to extend this functionality -// via inhertance, derived from xml_woarchive_impl instead. This will +// via inheritance, derived from xml_woarchive_impl instead. This will // preserve correct static polymorphism. class BOOST_SYMBOL_VISIBLE xml_woarchive : public xml_woarchive_impl<xml_woarchive> @@ -114,8 +112,11 @@ class BOOST_SYMBOL_VISIBLE xml_woarchive : public: xml_woarchive(std::wostream & os, unsigned int flags = 0) : xml_woarchive_impl<xml_woarchive>(os, flags) - {} - ~xml_woarchive(){} + { + if(0 == (flags & no_header)) + init(); + } + ~xml_woarchive() BOOST_OVERRIDE {} }; } // namespace archive diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/access.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/access.hpp index f6581accc9..f0c27a7e68 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/access.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/access.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // access.hpp: interface for serialization system. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -41,8 +41,8 @@ namespace detail { struct member_loader; } // namespace detail -// use an "accessor class so that we can use: -// "friend class boost::serialization::access;" +// use an "accessor class so that we can use: +// "friend class boost::serialization::access;" // in any serialized class to permit clean, safe access to private class members // by the serialization system @@ -62,20 +62,20 @@ public: friend class archive::detail::oserializer; template<class Archive, class T> friend inline void serialize( - Archive & ar, - T & t, + Archive & ar, + T & t, const unsigned int file_version ); template<class Archive, class T> friend inline void save_construct_data( - Archive & ar, - const T * t, + Archive & ar, + const T * t, const unsigned int file_version ); template<class Archive, class T> friend inline void load_construct_data( - Archive & ar, - T * t, + Archive & ar, + T * t, const unsigned int file_version ); #endif @@ -83,7 +83,7 @@ public: // pass calls to users's class implementation template<class Archive, class T> static void member_save( - Archive & ar, + Archive & ar, //const T & t, T & t, const unsigned int file_version @@ -92,7 +92,7 @@ public: } template<class Archive, class T> static void member_load( - Archive & ar, + Archive & ar, T & t, const unsigned int file_version ){ @@ -100,15 +100,15 @@ public: } template<class Archive, class T> static void serialize( - Archive & ar, - T & t, + Archive & ar, + T & t, const unsigned int file_version ){ // note: if you get a compile time error here with a // message something like: // cannot convert parameter 1 from <file type 1> to <file type 2 &> - // a likely possible cause is that the class T contains a - // serialize function - but that serialize function isn't + // a likely possible cause is that the class T contains a + // serialize function - but that serialize function isn't // a template and corresponds to a file type different than // the class Archive. To resolve this, don't include an // archive type other than that for which the serialization diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/array.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/array.hpp index 612d1a6198..c038cf04de 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/array.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/array.hpp @@ -18,8 +18,8 @@ #include <iostream> #include <cstddef> // std::size_t -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -39,7 +39,7 @@ void serialize(Archive& ar, std::array<T,N>& a, const unsigned int /* version */ "elems", *static_cast<T (*)[N]>(static_cast<void *>(a.data())) ); - + } } } // end namespace boost::serialization diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/array_optimization.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/array_optimization.hpp index 40dffba871..a43d16253b 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/array_optimization.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/array_optimization.hpp @@ -1,5 +1,5 @@ -#ifndef BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP -#define BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP +#ifndef BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP +#define BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP // (C) Copyright 2005 Matthias Troyer and Dave Abrahams // Use, modification and distribution is subject to the Boost Software @@ -9,8 +9,8 @@ #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -34,4 +34,4 @@ template <> struct use_array_optimization<Archive> { \ >::type {}; \ }; }} -#endif //BOOST_SERIALIZATION_ARRAY_OPTIMIZATON_HPP +#endif //BOOST_SERIALIZATION_ARRAY_OPTIMIZATION_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/array_wrapper.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/array_wrapper.hpp index adf436e15b..73e277c099 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/array_wrapper.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/array_wrapper.hpp @@ -6,13 +6,11 @@ // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) -//#include <iostream> - #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression #if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; +namespace std{ + using ::size_t; } // namespace std #endif @@ -81,18 +79,18 @@ public: { ar.load_array(*this,version); } - + // default implementation template<class Archive> void serialize(Archive &ar, const unsigned int version) { - typedef typename + typedef typename boost::serialization::use_array_optimization<Archive>::template apply< - typename remove_const< T >::type + typename remove_const< T >::type >::type use_optimized; serialize_optimized(ar,version,use_optimized()); } - + T * address() const { return m_t; diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/base_object.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/base_object.hpp index 1a82cecd4b..92131b4363 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/base_object.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/base_object.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // base_object.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -17,7 +17,7 @@ // See http://www.boost.org for updates, documentation, and revision history. // if no archive headers have been included this is a no op -// this is to permit BOOST_EXPORT etc to be included in a +// this is to permit BOOST_EXPORT etc to be included in a // file declaration header #include <boost/config.hpp> @@ -84,7 +84,7 @@ namespace detail } // namespace detail template<class Base, class Derived> -typename detail::base_cast<Base, Derived>::type & +typename detail::base_cast<Base, Derived>::type & base_object(Derived &d) { BOOST_STATIC_ASSERT(( is_base_and_derived<Base,Derived>::value)); diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/collection_size_type.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/collection_size_type.hpp index 2dd8fa7258..9b6115adbc 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/collection_size_type.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/collection_size_type.hpp @@ -12,7 +12,7 @@ #include <boost/serialization/split_free.hpp> #include <boost/serialization/is_bitwise_serializable.hpp> -namespace boost { +namespace boost { namespace serialization { //BOOST_STRONG_TYPEDEF(std::size_t, collection_size_type) @@ -22,35 +22,35 @@ private: typedef std::size_t base_type; base_type t; public: - collection_size_type(): t(0) {}; - explicit collection_size_type(const std::size_t & t_) : + collection_size_type(): t(0) {} + explicit collection_size_type(const std::size_t & t_) : t(t_) {} - collection_size_type(const collection_size_type & t_) : + collection_size_type(const collection_size_type & t_) : t(t_.t) {} collection_size_type & operator=(const collection_size_type & rhs){ - t = rhs.t; + t = rhs.t; return *this; } collection_size_type & operator=(const unsigned int & rhs){ - t = rhs; + t = rhs; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text input operator base_type & () { return t; - } + } bool operator==(const collection_size_type & rhs) const { return t == rhs.t; - } + } bool operator<(const collection_size_type & rhs) const { return t < rhs.t; - } + } }; diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/config.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/config.hpp index ea8cb9239e..0e3842eaec 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/config.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/config.hpp @@ -10,7 +10,7 @@ // See library home page at http://www.boost.org/libs/serialization -//----------------------------------------------------------------------------// +//----------------------------------------------------------------------------// // This header implements separate compilation features as described in // http://www.boost.org/more/separate_compilation.html @@ -18,7 +18,7 @@ #include <boost/config.hpp> #include <boost/detail/workaround.hpp> -// note: this version incorporates the related code into the the +// note: this version incorporates the related code into the the // the same library as BOOST_ARCHIVE. This could change some day in the // future @@ -48,7 +48,7 @@ #define BOOST_SERIALIZATION_DECL #endif -// enable automatic library variant selection ------------------------------// +// enable automatic library variant selection ------------------------------// #if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) \ && !defined(BOOST_ARCHIVE_SOURCE) && !defined(BOOST_WARCHIVE_SOURCE) \ @@ -69,6 +69,6 @@ // #include <boost/config/auto_link.hpp> -#endif +#endif #endif // BOOST_SERIALIZATION_CONFIG_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info.hpp index bb2a190d46..d38af2a85f 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // extended_type_info.hpp: interface for portable version of type_info -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -34,7 +34,7 @@ #define BOOST_SERIALIZATION_MAX_KEY_SIZE 128 -namespace boost { +namespace boost { namespace serialization { namespace void_cast_detail{ @@ -58,7 +58,7 @@ private: protected: BOOST_SERIALIZATION_DECL void key_unregister() const; BOOST_SERIALIZATION_DECL void key_register() const; - // this class can't be used as is. It's just the + // this class can't be used as is. It's just the // common functionality for all type_info replacement // systems. Hence, make these protected BOOST_SERIALIZATION_DECL extended_type_info( @@ -104,7 +104,7 @@ inline const char * guid(){ return ext::guid_impl<T>::call(); } -} // namespace serialization +} // namespace serialization } // namespace boost #ifdef BOOST_MSVC diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_no_rtti.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_no_rtti.hpp index aaa8b44459..5050ff17a7 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_no_rtti.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_no_rtti.hpp @@ -11,7 +11,7 @@ // on runtime typing (rtti - typeid) but uses a user specified string // as the portable class identifier. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -50,25 +50,25 @@ namespace serialization { namespace no_rtti_system { -// common base class to share type_info_key. This is used to +// common base class to share type_info_key. This is used to // identify the method used to keep track of the extended type class BOOST_SYMBOL_VISIBLE extended_type_info_no_rtti_0 : public extended_type_info { protected: BOOST_SERIALIZATION_DECL extended_type_info_no_rtti_0(const char * key); - BOOST_SERIALIZATION_DECL ~extended_type_info_no_rtti_0(); + BOOST_SERIALIZATION_DECL ~extended_type_info_no_rtti_0() BOOST_OVERRIDE; public: - virtual BOOST_SERIALIZATION_DECL bool - is_less_than(const boost::serialization::extended_type_info &rhs) const ; - virtual BOOST_SERIALIZATION_DECL bool - is_equal(const boost::serialization::extended_type_info &rhs) const ; + BOOST_SERIALIZATION_DECL bool + is_less_than(const boost::serialization::extended_type_info &rhs) const BOOST_OVERRIDE; + BOOST_SERIALIZATION_DECL bool + is_equal(const boost::serialization::extended_type_info &rhs) const BOOST_OVERRIDE; }; } // no_rtti_system template<class T> -class extended_type_info_no_rtti : +class extended_type_info_no_rtti : public no_rtti_system::extended_type_info_no_rtti_0, public singleton<extended_type_info_no_rtti< T > > { @@ -80,7 +80,7 @@ class extended_type_info_no_rtti : } }; struct undefined { - // if your program traps here - you failed to + // if your program traps here - you failed to // export a guid for this type. the no_rtti // system requires export for types serialized // as pointers. @@ -88,7 +88,7 @@ class extended_type_info_no_rtti : static const char * invoke(); }; static const char * invoke(){ - typedef + typedef typename boost::mpl::if_c< tf, defined, @@ -103,7 +103,7 @@ public: { key_register(); } - ~extended_type_info_no_rtti(){ + ~extended_type_info_no_rtti() BOOST_OVERRIDE { key_unregister(); } const extended_type_info * @@ -112,7 +112,7 @@ public: // this implementation doesn't depend on typeid() but assumes // that the specified type has a function of the following signature. // A common implemention of such a function is to define as a virtual - // function. So if the is not a polymporphic type it's likely an error + // function. So if the is not a polymorphic type it's likely an error BOOST_STATIC_WARNING(boost::is_polymorphic< T >::value); const char * derived_key = t.get_key(); BOOST_ASSERT(NULL != derived_key); @@ -121,10 +121,10 @@ public: const char * get_key() const{ return action<guid_defined< T >::value >::invoke(); } - virtual const char * get_debug_info() const{ + const char * get_debug_info() const BOOST_OVERRIDE { return action<guid_defined< T >::value >::invoke(); } - virtual void * construct(unsigned int count, ...) const{ + void * construct(unsigned int count, ...) const BOOST_OVERRIDE { // count up the arguments std::va_list ap; va_start(ap, count); @@ -145,7 +145,7 @@ public: return NULL; } } - virtual void destroy(void const * const p) const{ + void destroy(void const * const p) const BOOST_OVERRIDE { boost::serialization::access::destroy( static_cast<T const *>(p) ); @@ -157,7 +157,7 @@ public: } // namespace boost /////////////////////////////////////////////////////////////////////////////// -// If no other implementation has been designated as default, +// If no other implementation has been designated as default, // use this one. To use this implementation as the default, specify it // before any of the other headers. @@ -167,7 +167,7 @@ public: namespace serialization { template<class T> struct extended_type_info_impl { - typedef typename + typedef typename boost::serialization::extended_type_info_no_rtti< T > type; }; } // namespace serialization diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_typeid.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_typeid.hpp index 8ee591b316..9711b17b71 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_typeid.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/extended_type_info_typeid.hpp @@ -11,7 +11,7 @@ // on runtime typing (rtti - typeid) but uses a user specified string // as the portable class identifier. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -52,7 +52,7 @@ namespace typeid_system { class BOOST_SYMBOL_VISIBLE extended_type_info_typeid_0 : public extended_type_info { - virtual const char * get_debug_info() const { + const char * get_debug_info() const BOOST_OVERRIDE { if(static_cast<const std::type_info *>(0) == m_ti) return static_cast<const char *>(0); return m_ti->name(); @@ -60,16 +60,16 @@ class BOOST_SYMBOL_VISIBLE extended_type_info_typeid_0 : protected: const std::type_info * m_ti; BOOST_SERIALIZATION_DECL extended_type_info_typeid_0(const char * key); - BOOST_SERIALIZATION_DECL ~extended_type_info_typeid_0(); + BOOST_SERIALIZATION_DECL ~extended_type_info_typeid_0() BOOST_OVERRIDE; BOOST_SERIALIZATION_DECL void type_register(const std::type_info & ti); BOOST_SERIALIZATION_DECL void type_unregister(); BOOST_SERIALIZATION_DECL const extended_type_info * get_extended_type_info(const std::type_info & ti) const; public: - virtual BOOST_SERIALIZATION_DECL bool - is_less_than(const extended_type_info &rhs) const; - virtual BOOST_SERIALIZATION_DECL bool - is_equal(const extended_type_info &rhs) const; + BOOST_SERIALIZATION_DECL bool + is_less_than(const extended_type_info &rhs) const BOOST_OVERRIDE; + BOOST_SERIALIZATION_DECL bool + is_equal(const extended_type_info &rhs) const BOOST_OVERRIDE; const std::type_info & get_typeid() const { return *m_ti; } @@ -78,7 +78,7 @@ public: } // typeid_system template<class T> -class extended_type_info_typeid : +class extended_type_info_typeid : public typeid_system::extended_type_info_typeid_0, public singleton<extended_type_info_typeid< T > > { @@ -91,7 +91,7 @@ public: type_register(typeid(T)); key_register(); } - ~extended_type_info_typeid(){ + ~extended_type_info_typeid() BOOST_OVERRIDE { key_unregister(); type_unregister(); } @@ -102,7 +102,7 @@ public: // note: this implementation - based on usage of typeid (rtti) // only does something if the class has at least one virtual function. BOOST_STATIC_WARNING(boost::is_polymorphic< T >::value); - return + return typeid_system::extended_type_info_typeid_0::get_extended_type_info( typeid(t) ); @@ -110,7 +110,7 @@ public: const char * get_key() const { return boost::serialization::guid< T >(); } - virtual void * construct(unsigned int count, ...) const{ + void * construct(unsigned int count, ...) const BOOST_OVERRIDE { // count up the arguments std::va_list ap; va_start(ap, count); @@ -131,7 +131,7 @@ public: return NULL; } } - virtual void destroy(void const * const p) const { + void destroy(void const * const p) const BOOST_OVERRIDE { boost::serialization::access::destroy( static_cast<T const *>(p) ); @@ -143,7 +143,7 @@ public: } // namespace boost /////////////////////////////////////////////////////////////////////////////// -// If no other implementation has been designated as default, +// If no other implementation has been designated as default, // use this one. To use this implementation as the default, specify it // before any of the other headers. #ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO @@ -152,7 +152,7 @@ public: namespace serialization { template<class T> struct extended_type_info_impl { - typedef typename + typedef typename boost::serialization::extended_type_info_typeid< T > type; }; } // namespace serialization diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/factory.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/factory.hpp index 2db7e7e36c..9489bc822f 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/factory.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/factory.hpp @@ -9,7 +9,7 @@ // factory.hpp: create an instance from an extended_type_info instance. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -19,7 +19,7 @@ #include <cstdarg> // valist #include <cstddef> // NULL -#include <boost/preprocessor/control/if.hpp> +#include <boost/preprocessor/control/if.hpp> #include <boost/preprocessor/comparison/greater.hpp> #include <boost/assert.hpp> diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/force_include.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/force_include.hpp index 55ab79d0d5..a418b0ec75 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/force_include.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/force_include.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // force_include.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/item_version_type.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/item_version_type.hpp index f3e5adac6f..d0fb910622 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/item_version_type.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/item_version_type.hpp @@ -14,7 +14,7 @@ // fixes broken example build on x86_64-linux-gnu-gcc-4.6.0 #include <boost/assert.hpp> -namespace boost { +namespace boost { namespace serialization { #if defined(_MSC_VER) @@ -28,28 +28,28 @@ private: base_type t; public: // should be private - but MPI fails if it's not!!! - item_version_type(): t(0) {}; + item_version_type(): t(0) {} explicit item_version_type(const unsigned int t_) : t(t_){ BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max); } - item_version_type(const item_version_type & t_) : + item_version_type(const item_version_type & t_) : t(t_.t) {} item_version_type & operator=(item_version_type rhs){ - t = rhs.t; + t = rhs.t; return *this; } // used for text output operator base_type () const { return t; - } + } // used for text input operator base_type & () { return t; } bool operator==(const item_version_type & rhs) const { return t == rhs.t; - } + } bool operator<(const item_version_type & rhs) const { return t < rhs.t; } diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/level.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/level.hpp index f6a84d1042..13cf05b9da 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/level.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/level.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // level.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -80,7 +80,7 @@ struct implementation_level_impl { }; template<class T> -struct implementation_level : +struct implementation_level : public implementation_level_impl<const T> { }; diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/level_enum.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/level_enum.hpp index baf64e04f3..965b46f8ad 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/level_enum.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/level_enum.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // level_enum.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -37,12 +37,12 @@ enum level_type primitive_type = 1, // Serialize the objects of this type using the objects "serialize" // function or template. This permits values to be written/read - // to/from archives but includes no class or version information. + // to/from archives but includes no class or version information. object_serializable = 2, /////////////////////////////////////////////////////////////////// // once an object is serialized at one of the above levels, the // corresponding archives cannot be read if the implementation level - // for the archive object is changed. + // for the archive object is changed. /////////////////////////////////////////////////////////////////// // Add class information to the archive. Class information includes // implementation level, class version and class name if available diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/library_version_type.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/library_version_type.hpp new file mode 100644 index 0000000000..5acb2d47e1 --- /dev/null +++ b/contrib/restricted/boost/serialization/include/boost/serialization/library_version_type.hpp @@ -0,0 +1,75 @@ +#ifndef BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP +#define BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// library_version_type.hpp: + +// (C) Copyright 2002-2020 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. +#include <cstring> // count +#include <boost/cstdint.hpp> // uint_least16_t +#include <boost/assert.hpp> +#include <boost/config.hpp> +#include <boost/integer_traits.hpp> + +namespace boost { +namespace serialization { + +#if defined(_MSC_VER) +#pragma warning( push ) +#pragma warning( disable : 4244 4267 ) +#endif + +/* NOTE : Warning : Warning : Warning : Warning : Warning + * Don't ever changes this. If you do, they previously created + * binary archives won't be readable !!! + */ +class library_version_type { +private: + typedef uint_least16_t base_type; + base_type t; +public: + library_version_type(): t(0) {} + explicit library_version_type(const unsigned int & t_) : t(t_){ + BOOST_ASSERT(t_ <= boost::integer_traits<base_type>::const_max); + } + library_version_type(const library_version_type & t_) : + t(t_.t) + {} + library_version_type & operator=(const library_version_type & rhs){ + t = rhs.t; + return *this; + } + // used for text output + operator base_type () const { + return t; + } + // used for text input + operator base_type & (){ + return t; + } + bool operator==(const library_version_type & rhs) const { + return t == rhs.t; + } + bool operator<(const library_version_type & rhs) const { + return t < rhs.t; + } +}; + +#if defined(_MSC_VER) +#pragma warning( pop ) +#endif + +} // serialization +} // boost + +#endif // BOOST_SERIALIZATION_LIBRARY_VERSION_TYPE_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/nvp.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/nvp.hpp index 066fe94d87..88cecc8b1c 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/nvp.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/nvp.hpp @@ -9,85 +9,61 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // nvp.hpp: interface for serialization system. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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. -#include <utility> +#include <boost/core/nvp.hpp> +#include <boost/preprocessor/stringize.hpp> -#include <boost/config.hpp> -#include <boost/detail/workaround.hpp> +#define BOOST_SERIALIZATION_NVP(name) \ + boost::serialization::make_nvp(BOOST_PP_STRINGIZE(name), name) +/**/ + +#define BOOST_SERIALIZATION_BASE_OBJECT_NVP(name) \ + boost::serialization::make_nvp( \ + BOOST_PP_STRINGIZE(name), \ + boost::serialization::base_object<name >(*this) \ + ) +/**/ #include <boost/serialization/level.hpp> #include <boost/serialization/tracking.hpp> -#include <boost/serialization/split_member.hpp> -#include <boost/serialization/base_object.hpp> -#include <boost/serialization/traits.hpp> +#include <boost/serialization/split_free.hpp> #include <boost/serialization/wrapper.hpp> - -#include <boost/core/addressof.hpp> +#include <boost/serialization/base_object.hpp> namespace boost { namespace serialization { -template<class T> -struct nvp : - public std::pair<const char *, T *>, - public wrapper_traits<const nvp< T > > -{ -//private: - nvp(const nvp & rhs) : - std::pair<const char *, T *>(rhs.first, rhs.second) - {} -public: - explicit nvp(const char * name_, T & t) : - // note: added _ to suppress useless gcc warning - std::pair<const char *, T *>(name_, boost::addressof(t)) - {} - - const char * name() const { - return this->first; - } - T & value() const { - return *(this->second); - } - - const T & const_value() const { - return *(this->second); - } - - template<class Archive> - void save( - Archive & ar, - const unsigned int /* file_version */ - ) const { - ar.operator<<(const_value()); - } - template<class Archive> - void load( - Archive & ar, - const unsigned int /* file_version */ - ){ - ar.operator>>(value()); - } - BOOST_SERIALIZATION_SPLIT_MEMBER() -}; - -template<class T> -inline -const nvp< T > make_nvp(const char * name, T & t){ - return nvp< T >(name, t); +template<class Archive, class T> +void save( + Archive & ar, + const nvp<T> & t, + const unsigned int /* file_version */ +){ + ar << t.const_value(); +} +template<class Archive, class T> +void load( + Archive & ar, + nvp<T> & t , + const unsigned int /* file_version */ +){ + ar >> t.value(); } -// to maintain efficiency and portability, we want to assign -// specific serialization traits to all instances of this wrappers. -// we can't strait forward method below as it depends upon -// Partial Template Specialization and doing so would mean that wrappers -// wouldn't be treated the same on different platforms. This would -// break archive portability. Leave this here as reminder not to use it !!! +template<class Archive, class T> +inline void serialize( + Archive & ar, + nvp<T> & t, + const unsigned int file_version +){ + split_free(ar, t, file_version); +} template <class T> struct implementation_level<nvp< T > > @@ -96,6 +72,13 @@ struct implementation_level<nvp< T > > typedef mpl::int_<object_serializable> type; BOOST_STATIC_CONSTANT(int, value = implementation_level::type::value); }; +template <class T> +struct implementation_level<const nvp< T > > +{ + typedef mpl::integral_c_tag tag; + typedef mpl::int_<object_serializable> type; + BOOST_STATIC_CONSTANT(int, value = implementation_level::type::value); +}; // nvp objects are generally created on the stack and are never tracked template<class T> @@ -105,21 +88,46 @@ struct tracking_level<nvp< T > > typedef mpl::int_<track_never> type; BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value); }; +template<class T> +struct tracking_level<const nvp< T > > +{ + typedef mpl::integral_c_tag tag; + typedef mpl::int_<track_never> type; + BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value); +}; -} // seralization -} // boost +// these traits aren't used by nvp so they don't need to be defined +#if 0 +template<class T> +struct version<const nvp< T > > { + typedef mpl::integral_c_tag tag; + typedef mpl::int_<0> type; + BOOST_STATIC_CONSTANT(int, value = 0); +}; +struct version<const nvp< T > > { + typedef mpl::integral_c_tag tag; + typedef mpl::int_<0> type; + BOOST_STATIC_CONSTANT(int, value = 0); +}; -#include <boost/preprocessor/stringize.hpp> +template<class T> +struct extended_type_info_impl<const nvp< T > > { + typedef extended_type_info_impl< T > type; +}; +#endif -#define BOOST_SERIALIZATION_NVP(name) \ - boost::serialization::make_nvp(BOOST_PP_STRINGIZE(name), name) -/**/ +template<class T> +struct is_wrapper<const nvp<T> > { + typedef boost::mpl::true_ type; +}; +template<class T> +struct is_wrapper<nvp<T> > { + typedef boost::mpl::true_ type; +}; + + +} // seralization +} // boost -#define BOOST_SERIALIZATION_BASE_OBJECT_NVP(name) \ - boost::serialization::make_nvp( \ - BOOST_PP_STRINGIZE(name), \ - boost::serialization::base_object<name >(*this) \ - ) -/**/ #endif // BOOST_SERIALIZATION_NVP_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/serialization.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/serialization.hpp index a4d04723c7..79d6412da5 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/serialization.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/serialization.hpp @@ -16,7 +16,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // serialization.hpp: interface for serialization system. -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -24,7 +24,7 @@ // See http://www.boost.org for updates, documentation, and revision history. ////////////////////////////////////////////////////////////////////// -// public interface to serialization. +// public interface to serialization. ///////////////////////////////////////////////////////////////////////////// // layer 0 - intrusive verison @@ -45,15 +45,6 @@ ///////////////////////////////////////////////////////////////////////////// // layer 2 - default implementation of non-intrusive serialization. // -// note the usage of function overloading to compensate that C++ does not -// currently support Partial Template Specialization for function templates -// We have declared the version number as "const unsigned long". -// Overriding templates for specific data types should declare the version -// number as "const unsigned int". Template matching will first be applied -// to functions with the same version types - that is the overloads. -// If there is no declared function prototype that matches, the second argument -// will be converted to "const unsigned long" and a match will be made with -// one of the default template functions below. namespace boost { namespace serialization { @@ -71,8 +62,8 @@ inline void serialize( // save data required for construction template<class Archive, class T> inline void save_construct_data( - Archive & /*ar*/, - const T * /*t*/, + Archive & /*ar*/, + const T * /*t*/, const unsigned int /*file_version */ ){ // default is to save no data because default constructor @@ -82,8 +73,8 @@ inline void save_construct_data( // load data required for construction and invoke constructor in place template<class Archive, class T> inline void load_construct_data( - Archive & /*ar*/, - T * t, + Archive & /*ar*/, + T * t, const unsigned int /*file_version*/ ){ // default just uses the default constructor. going @@ -98,10 +89,10 @@ inline void load_construct_data( // // on compilers which don't implement ADL. only the current namespace // i.e. boost::serialization will be searched. -// +// // on compilers which DO implement ADL // serialize overrides can be in any of the following -// +// // 1) same namepace as Archive // 2) same namespace as T // 3) boost::serialization @@ -110,37 +101,29 @@ inline void load_construct_data( template<class Archive, class T> inline void serialize_adl( - Archive & ar, - T & t, + Archive & ar, + T & t, const unsigned int file_version ){ - // note usage of function overloading to delay final resolution - // until the point of instantiation. This works around the two-phase - // lookup "feature" which inhibits redefintion of a default function - // template implementation. Due to Robert Ramey - // - // Note that this trick generates problems for compiles which don't support - // PFTO, suppress it here. As far as we know, there are no compilers - // which fail to support PFTO while supporting two-phase lookup. const version_type v(file_version); serialize(ar, t, v); } template<class Archive, class T> inline void save_construct_data_adl( - Archive & ar, - const T * t, + Archive & ar, + const T * t, const unsigned int file_version ){ - // see above + const version_type v(file_version); save_construct_data(ar, t, v); } template<class Archive, class T> inline void load_construct_data_adl( - Archive & ar, - T * t, + Archive & ar, + T * t, const unsigned int file_version ){ // see above comment diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/singleton.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/singleton.hpp index 0bde1f9551..427e1bbd5c 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/singleton.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/singleton.hpp @@ -9,6 +9,8 @@ // Copyright Robert Ramey 2007. Changes made to permit // application throughout the serialization library. // +// Copyright Alexander Grund 2018. Corrections to singleton lifetime +// // Distributed under 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) @@ -32,15 +34,15 @@ // MS compatible compilers support #pragma once #if defined(_MSC_VER) # pragma once -#endif +#endif #include <boost/assert.hpp> #include <boost/config.hpp> #include <boost/noncopyable.hpp> #include <boost/serialization/force_include.hpp> +#include <boost/serialization/config.hpp> #include <boost/archive/detail/auto_link_archive.hpp> -#include <boost/serialization/config.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header #ifdef BOOST_MSVC @@ -48,8 +50,8 @@ # pragma warning(disable : 4511 4512) #endif -namespace boost { -namespace serialization { +namespace boost { +namespace serialization { ////////////////////////////////////////////////////////////////////// // Provides a dynamically-initialized (singleton) instance of T in a @@ -58,7 +60,7 @@ namespace serialization { // details. // -// singletons created by this code are guarenteed to be unique +// Singletons created by this code are guaranteed to be unique // within the executable or shared library which creates them. // This is sufficient and in fact ideal for the serialization library. // The singleton is created when the module is loaded and destroyed @@ -74,14 +76,22 @@ namespace serialization { // Second, it provides a mechanism to detect when a non-const function // is called after initialization. -// make a singleton to lock/unlock all singletons for alteration. +// Make a singleton to lock/unlock all singletons for alteration. // The intent is that all singletons created/used by this code // are to be initialized before main is called. A test program -// can lock all the singletons when main is entereed. This any -// attempt to retieve a mutable instances while locked will -// generate a assertion if compiled for debug. - -// note usage of BOOST_DLLEXPORT. These functions are in danger of +// can lock all the singletons when main is entered. Thus any +// attempt to retrieve a mutable instance while locked will +// generate an assertion if compiled for debug. + +// The singleton template can be used in 2 ways: +// 1 (Recommended): Publicly inherit your type T from singleton<T>, +// make its ctor protected and access it via T::get_const_instance() +// 2: Simply access singleton<T> without changing T. Note that this only +// provides a global instance accesible by singleton<T>::get_const_instance() +// or singleton<T>::get_mutable_instance() to prevent using multiple instances +// of T make its ctor protected + +// Note on usage of BOOST_DLLEXPORT: These functions are in danger of // being eliminated by the optimizer when building an application in // release mode. Usage of the macro is meant to signal the compiler/linker // to avoid dropping these functions which seem to be unreferenced. @@ -91,86 +101,110 @@ class BOOST_SYMBOL_VISIBLE singleton_module : public boost::noncopyable { private: - BOOST_DLLEXPORT static bool & get_lock() BOOST_USED { + BOOST_DLLEXPORT bool & get_lock() BOOST_USED { static bool lock = false; return lock; } public: - BOOST_DLLEXPORT static void lock(){ + BOOST_DLLEXPORT void lock(){ get_lock() = true; } - BOOST_DLLEXPORT static void unlock(){ + BOOST_DLLEXPORT void unlock(){ get_lock() = false; } - BOOST_DLLEXPORT static bool is_locked(){ + BOOST_DLLEXPORT bool is_locked(){ return get_lock(); } }; -template <class T> -class singleton : public singleton_module +static inline singleton_module & get_singleton_module(){ + static singleton_module m; + return m; +} + +namespace detail { + +// This is the class actually instantiated and hence the real singleton. +// So there will only be one instance of this class. This does not hold +// for singleton<T> as a class derived from singleton<T> could be +// instantiated multiple times. +// It also provides a flag `is_destroyed` which returns true, when the +// class was destructed. It is static and hence accesible even after +// destruction. This can be used to check, if the singleton is still +// accesible e.g. in destructors of other singletons. +template<class T> +class singleton_wrapper : public T { + static bool & get_is_destroyed(){ + // Prefer a static function member to avoid LNK1179. + // Note: As this is for a singleton (1 instance only) it must be set + // never be reset (to false)! + static bool is_destroyed_flag = false; + return is_destroyed_flag; + } +public: + singleton_wrapper(){ + BOOST_ASSERT(! is_destroyed()); + } + ~singleton_wrapper(){ + get_is_destroyed() = true; + } + static bool is_destroyed(){ + return get_is_destroyed(); + } +}; + +} // detail + +template <class T> +class singleton { private: - static T & m_instance; + static T * m_instance; // include this to provoke instantiation at pre-execution time - static void use(T const *) {} + static void use(T const &) {} static T & get_instance() { - // use a wrapper so that types T with protected constructors - // can be used - class singleton_wrapper : public T {}; - - // Use a heap-allocated instance to work around static variable - // destruction order issues: this inner singleton_wrapper<> - // instance may be destructed before the singleton<> instance. - // Using a 'dumb' static variable lets us precisely choose the - // time destructor is invoked. - static singleton_wrapper *t = 0; - - // refer to instance, causing it to be instantiated (and - // initialized at startup on working compilers) BOOST_ASSERT(! is_destroyed()); + // use a wrapper so that types T with protected constructors can be used + // Using a static function member avoids LNK1179 + static detail::singleton_wrapper< T > t; + // note that the following is absolutely essential. // commenting out this statement will cause compilers to fail to // construct the instance at pre-execution time. This would prevent // our usage/implementation of "locking" and introduce uncertainty into - // the sequence of object initializaition. - use(& m_instance); + // the sequence of object initialization. + // Unfortunately, this triggers detectors of undefine behavior + // and reports an error. But I've been unable to find a different + // of guarenteeing that the the singleton is created at pre-main time. + if (m_instance) use(* m_instance); - if (!t) - t = new singleton_wrapper; - return static_cast<T &>(*t); - } - static bool & get_is_destroyed(){ - static bool is_destroyed; - return is_destroyed; + return static_cast<T &>(t); } +protected: + // Do not allow instantiation of a singleton<T>. But we want to allow + // `class T: public singleton<T>` so we can't delete this ctor + BOOST_DLLEXPORT singleton(){} public: BOOST_DLLEXPORT static T & get_mutable_instance(){ - BOOST_ASSERT(! is_locked()); + BOOST_ASSERT(! get_singleton_module().is_locked()); return get_instance(); } BOOST_DLLEXPORT static const T & get_const_instance(){ return get_instance(); } BOOST_DLLEXPORT static bool is_destroyed(){ - return get_is_destroyed(); - } - BOOST_DLLEXPORT singleton(){ - get_is_destroyed() = false; - } - BOOST_DLLEXPORT ~singleton() { - if (!get_is_destroyed()) { - delete &(get_instance()); - } - get_is_destroyed() = true; + return detail::singleton_wrapper< T >::is_destroyed(); } }; +// Assigning the instance reference to a static member forces initialization +// at startup time as described in +// https://groups.google.com/forum/#!topic/microsoft.public.vc.language/kDVNLnIsfZk template<class T> -T & singleton< T >::m_instance = singleton< T >::get_instance(); +T * singleton< T >::m_instance = & singleton< T >::get_instance(); } // namespace serialization } // namespace boost diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/smart_cast.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/smart_cast.hpp index 563f36aa20..701a417c9c 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/smart_cast.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/smart_cast.hpp @@ -9,18 +9,18 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // smart_cast.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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/libs/serialization for updates, documentation, and revision history. -// casting of pointers and references. +// casting of pointers and references. // In casting between different C++ classes, there are a number of // rules that have to be kept in mind in deciding whether to use -// static_cast or dynamic_cast. +// static_cast or dynamic_cast. // a) dynamic casting can only be applied when one of the types is polymorphic // Otherwise static_cast must be used. @@ -136,7 +136,7 @@ namespace smart_cast_impl { struct pointer { struct polymorphic { - // unfortunately, this below fails to work for virtual base + // unfortunately, this below fails to work for virtual base // classes. need has_virtual_base to do this. // Subject for further study #if 0 @@ -220,7 +220,7 @@ namespace smart_cast_impl { template<class T> struct error { // if we get here, its because we are using one argument in the - // cast on a system which doesn't support partial template + // cast on a system which doesn't support partial template // specialization template<class U> static T cast(U){ diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/split_free.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/split_free.hpp index 85e2f590fe..9de2e92795 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/split_free.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/split_free.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // split_free.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -35,8 +35,8 @@ namespace serialization { template<class Archive, class T> struct free_saver { static void invoke( - Archive & ar, - const T & t, + Archive & ar, + const T & t, const unsigned int file_version ){ // use function overload (version_type) to workaround @@ -48,8 +48,8 @@ struct free_saver { template<class Archive, class T> struct free_loader { static void invoke( - Archive & ar, - T & t, + Archive & ar, + T & t, const unsigned int file_version ){ // use function overload (version_type) to workaround @@ -62,13 +62,13 @@ struct free_loader { template<class Archive, class T> inline void split_free( - Archive & ar, - T & t, + Archive & ar, + T & t, const unsigned int file_version ){ typedef typename mpl::eval_if< typename Archive::is_saving, - mpl::identity</* detail:: */ free_saver<Archive, T> >, + mpl::identity</* detail:: */ free_saver<Archive, T> >, mpl::identity</* detail:: */ free_loader<Archive, T> > >::type typex; typex::invoke(ar, t, file_version); diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/split_member.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/split_member.hpp index 5f32520559..c6a59f1b72 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/split_member.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/split_member.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // split_member.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -36,7 +36,7 @@ namespace detail { template<class Archive, class T> struct member_saver { static void invoke( - Archive & ar, + Archive & ar, const T & t, const unsigned int file_version ){ @@ -47,7 +47,7 @@ namespace detail { template<class Archive, class T> struct member_loader { static void invoke( - Archive & ar, + Archive & ar, T & t, const unsigned int file_version ){ @@ -63,7 +63,7 @@ inline void split_member( ){ typedef typename mpl::eval_if< typename Archive::is_saving, - mpl::identity<detail::member_saver<Archive, T> >, + mpl::identity<detail::member_saver<Archive, T> >, mpl::identity<detail::member_loader<Archive, T> > >::type typex; typex::invoke(ar, t, file_version); diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/state_saver.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/state_saver.hpp index 248b8d9155..f67f79b752 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/state_saver.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/state_saver.hpp @@ -59,8 +59,8 @@ private: static void invoke(T & previous_ref, const T & previous_value){ BOOST_TRY{ previous_ref = previous_value; - } - BOOST_CATCH(::std::exception &) { + } + BOOST_CATCH(::std::exception &) { // we must ignore it - we are in destructor } BOOST_CATCH_END @@ -70,11 +70,11 @@ private: public: state_saver( T & object - ) : + ) : previous_value(object), - previous_ref(object) + previous_ref(object) {} - + ~state_saver() { #ifndef BOOST_NO_EXCEPTIONS typedef typename mpl::eval_if< diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/static_warning.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/static_warning.hpp index 1d9238fc4d..a1b6899e2e 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/static_warning.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/static_warning.hpp @@ -16,7 +16,7 @@ /* Revision history: 15 June 2003 - Initial version. - 31 March 2004 - improved diagnostic messages and portability + 31 March 2004 - improved diagnostic messages and portability (Jonathan Turkanis) 03 April 2004 - works on VC6 at class and namespace scope - ported to DigitalMars @@ -49,8 +49,8 @@ // 3. static_warning_impl<B>::type overloads operator& to return a dynamically // allocated int pointer only is B is true, so returning the address of an // automatic variable of this type generates a warning iff B is fasle. -// 4. static_warning_impl<B>::STATIC_WARNING is decalred as a struct iff B is -// false. +// 4. static_warning_impl<B>::STATIC_WARNING is decalred as a struct iff B is +// false. // 5. static_warning_impl<B>::type is incomplete iff B is false, so deleting a // pointer to this type generates a warning iff B is false. // @@ -72,7 +72,7 @@ namespace boost { namespace serialization { -template<int L> +template<int L> struct BOOST_SERIALIZATION_STATIC_WARNING_LINE{}; template<bool B, int L> @@ -97,7 +97,7 @@ struct BOOST_SERIALIZATION_SS {}; #define BOOST_SERIALIZATION_BSW(B, L) \ typedef boost::serialization::BOOST_SERIALIZATION_SS< \ sizeof( boost::serialization::static_warning_test< B, L > ) \ - > BOOST_JOIN(STATIC_WARNING_LINE, L) BOOST_ATTRIBUTE_UNUSED; + > BOOST_JOIN(STATIC_WARNING_LINE, L) BOOST_ATTRIBUTE_UNUSED; #define BOOST_STATIC_WARNING(B) BOOST_SERIALIZATION_BSW(B, __LINE__) #endif // BOOST_SERIALIZATION_STATIC_WARNING_HPP diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/string.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/string.hpp index 76e695d4f3..edcbd4b143 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/string.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/string.hpp @@ -10,7 +10,7 @@ // serialization/string.hpp: // serialization for stl string templates -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/strong_typedef.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/strong_typedef.hpp index fdd1b24c9c..2770ae4553 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/strong_typedef.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/strong_typedef.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // strong_typedef.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . // (C) Copyright 2016 Ashish Sadanandan // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/throw_exception.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/throw_exception.hpp index b67618adc9..1672f0bb78 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/throw_exception.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/throw_exception.hpp @@ -26,13 +26,13 @@ namespace serialization { #ifdef BOOST_NO_EXCEPTIONS -inline void throw_exception(std::exception const & e) { +BOOST_NORETURN inline void throw_exception(std::exception const & e) { ::boost::throw_exception(e); } #else -template<class E> inline void throw_exception(E const & e){ +template<class E> BOOST_NORETURN inline void throw_exception(E const & e){ throw e; } diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/tracking.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/tracking.hpp index d5c79b8409..8933407489 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/tracking.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/tracking.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // tracking.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -60,7 +60,7 @@ struct tracking_level_impl { // for primitives typename mpl::equal_to< implementation_level< T >, - mpl::int_<primitive_type> + mpl::int_<primitive_type> >, // is never mpl::int_<track_never>, @@ -71,7 +71,7 @@ struct tracking_level_impl { }; template<class T> -struct tracking_level : +struct tracking_level : public tracking_level_impl<const T> { }; @@ -86,10 +86,10 @@ inline bool operator>=(tracking_level< T > t, enum tracking_type l) } // namespace boost -// The STATIC_ASSERT is prevents one from setting tracking for a primitive type. -// This almost HAS to be an error. Doing this will effect serialization of all -// char's in your program which is almost certainly what you don't want to do. -// If you want to track all instances of a given primitive type, You'll have to +// The STATIC_ASSERT is prevents one from setting tracking for a primitive type. +// This almost HAS to be an error. Doing this will effect serialization of all +// char's in your program which is almost certainly what you don't want to do. +// If you want to track all instances of a given primitive type, You'll have to // wrap it in your own type so its not a primitive anymore. Then it will compile // without problem. #define BOOST_CLASS_TRACKING(T, E) \ diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/tracking_enum.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/tracking_enum.hpp index 278051e1ba..ef38ba9c2d 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/tracking_enum.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/tracking_enum.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // tracking_enum.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -28,7 +28,7 @@ enum tracking_type { // never track this type track_never = 0, - // track objects of this type if the object is serialized through a + // track objects of this type if the object is serialized through a // pointer. track_selectively = 1, // always track this type diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/traits.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/traits.hpp index 9e114fdd3d..45e0c93fbf 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/traits.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/traits.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // traits.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -18,7 +18,7 @@ // This header is used to apply serialization traits to templates. The // standard system can't be used for platforms which don't support -// Partial Templlate Specialization. +// Partial Templlate Specialization. // The motivation for this is the Name-Value Pair (NVP) template. // it has to work the same on all platforms in order for archives @@ -42,8 +42,8 @@ template <class T> struct extended_type_info_impl; template< - class T, - int Level, + class T, + int Level, int Tracking, unsigned int Version = 0, class ETII = extended_type_info_impl< T >, diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/type_info_implementation.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/type_info_implementation.hpp index 24637a8dbb..8b91120960 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/type_info_implementation.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/type_info_implementation.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // type_info_implementation.hpp: interface for portable version of type_info -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -39,7 +39,7 @@ struct type_info_implementation { }; // note: at least one compiler complained w/o the full qualification // on basic traits below - typedef + typedef typename mpl::eval_if< is_base_and_derived<boost::serialization::basic_traits, T>, traits_class_typeinfo_implementation< T >, @@ -54,7 +54,7 @@ struct type_info_implementation { } // namespace boost // define a macro to assign a particular derivation of extended_type_info -// to a specified a class. +// to a specified a class. #define BOOST_CLASS_TYPE_INFO(T, ETI) \ namespace boost { \ namespace serialization { \ diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/utility.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/utility.hpp index 4867a4a12d..474baa4593 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/utility.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/utility.hpp @@ -10,7 +10,7 @@ // serialization/utility.hpp: // serialization for stl utility templates -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -25,7 +25,7 @@ #include <boost/serialization/is_bitwise_serializable.hpp> #include <boost/mpl/and.hpp> -namespace boost { +namespace boost { namespace serialization { // pair @@ -35,7 +35,7 @@ inline void serialize( std::pair<F, S> & p, const unsigned int /* file_version */ ){ - // note: we remove any const-ness on the first argument. The reason is that + // note: we remove any const-ness on the first argument. The reason is that // for stl maps, the type saved is pair<const key, T). We remove // the const-ness in order to be able to load it. typedef typename boost::remove_const<F>::type typef; diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp index 21a74d73da..6299ada2a0 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/version.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // version.hpp: -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002 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) @@ -25,7 +25,7 @@ #include <boost/type_traits/is_base_and_derived.hpp> -namespace boost { +namespace boost { namespace serialization { struct basic_traits; @@ -69,8 +69,6 @@ const int version<T>::value; * ALL the serialization traits are available. Included the implementation * here with this comment as a reminder not to do this! */ -//#include <boost/serialization/level.hpp> -//#include <boost/mpl/equal_to.hpp> #include <boost/mpl/less.hpp> #include <boost/mpl/comparison.hpp> diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/void_cast.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/void_cast.hpp index f1b3828611..1c878be755 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/void_cast.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/void_cast.hpp @@ -1,4 +1,4 @@ -#ifndef BOOST_SERIALIZATION_VOID_CAST_HPP +#ifndef BOOST_SERIALIZATION_VOID_CAST_HPP #define BOOST_SERIALIZATION_VOID_CAST_HPP // MS compatible compilers support #pragma once @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // void_cast.hpp: interface for run-time casting of void pointers. -// (C) Copyright 2002-2009 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2002-2009 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) @@ -27,6 +27,7 @@ #include <boost/serialization/type_info_implementation.hpp> #include <boost/serialization/extended_type_info.hpp> #include <boost/type_traits/is_virtual_base_of.hpp> +#include <boost/type_traits/aligned_storage.hpp> #include <boost/serialization/void_cast_fwd.hpp> #include <boost/serialization/config.hpp> @@ -37,20 +38,20 @@ # pragma warning(disable : 4251 4231 4660 4275) #endif -namespace boost { -namespace serialization { +namespace boost { +namespace serialization { class extended_type_info; // Given a void *, assume that it really points to an instance of one type // and alter it so that it would point to an instance of a related type. // Return the altered pointer. If there exists no sequence of casts that -// can transform from_type to to_type, return a NULL. +// can transform from_type to to_type, return a NULL. BOOST_SERIALIZATION_DECL void const * void_upcast( - extended_type_info const & derived, - extended_type_info const & base, + extended_type_info const & derived, + extended_type_info const & base, void const * const t ); @@ -58,19 +59,19 @@ inline void * void_upcast( extended_type_info const & derived, extended_type_info const & base, - void * const t + void * const t ){ return const_cast<void*>(void_upcast( - derived, - base, + derived, + base, const_cast<void const *>(t) )); } BOOST_SERIALIZATION_DECL void const * void_downcast( - extended_type_info const & derived, - extended_type_info const & base, + extended_type_info const & derived, + extended_type_info const & base, void const * const t ); @@ -78,11 +79,11 @@ inline void * void_downcast( extended_type_info const & derived, extended_type_info const & base, - void * const t + void * const t ){ return const_cast<void*>(void_downcast( - derived, - base, + derived, + base, const_cast<void const *>(t) )); } @@ -92,14 +93,14 @@ namespace void_cast_detail { class BOOST_SYMBOL_VISIBLE void_caster : private boost::noncopyable { - friend + friend BOOST_SERIALIZATION_DECL void const * boost::serialization::void_upcast( extended_type_info const & derived, extended_type_info const & base, void const * const ); - friend + friend BOOST_SERIALIZATION_DECL void const * boost::serialization::void_downcast( extended_type_info const & derived, @@ -121,7 +122,7 @@ public: // 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 operator<(const void_caster & rhs) const; const void_caster & operator*(){ @@ -154,40 +155,43 @@ template <class Derived, class Base> class BOOST_SYMBOL_VISIBLE void_caster_primitive : public void_caster { - virtual void const * downcast(void const * const t) const { - const Derived * d = + void const * downcast(void const * const t) const BOOST_OVERRIDE { + const Derived * d = boost::serialization::smart_cast<const Derived *, const Base *>( static_cast<const Base *>(t) ); return d; } - virtual void const * upcast(void const * const t) const { - const Base * b = + void const * upcast(void const * const t) const BOOST_OVERRIDE { + const Base * b = boost::serialization::smart_cast<const Base *, const Derived *>( static_cast<const Derived *>(t) ); return b; } - virtual bool has_virtual_base() const { + bool has_virtual_base() const BOOST_OVERRIDE { return false; } public: void_caster_primitive(); - virtual ~void_caster_primitive(); + ~void_caster_primitive() BOOST_OVERRIDE; + +private: + static std::ptrdiff_t base_offset() { + typename boost::aligned_storage<sizeof(Derived)>::type data; + return reinterpret_cast<char*>(&data) + - reinterpret_cast<char*>( + static_cast<Base*>( + reinterpret_cast<Derived*>(&data))); + } }; template <class Derived, class Base> void_caster_primitive<Derived, Base>::void_caster_primitive() : - void_caster( - & type_info_implementation<Derived>::type::get_const_instance(), + void_caster( + & type_info_implementation<Derived>::type::get_const_instance(), & type_info_implementation<Base>::type::get_const_instance(), - // note:I wanted to displace from 0 here, but at least one compiler - // treated 0 by not shifting it at all. - reinterpret_cast<std::ptrdiff_t>( - static_cast<Derived *>( - reinterpret_cast<Base *>(8) - ) - ) - 8 + base_offset() ) { recursive_register(); @@ -202,26 +206,26 @@ template <class Derived, class Base> class BOOST_SYMBOL_VISIBLE void_caster_virtual_base : public void_caster { - virtual bool has_virtual_base() const { + bool has_virtual_base() const BOOST_OVERRIDE { return true; } public: - virtual void const * downcast(void const * const t) const { - const Derived * d = + void const * downcast(void const * const t) const BOOST_OVERRIDE { + const Derived * d = dynamic_cast<const Derived *>( static_cast<const Base *>(t) ); return d; } - virtual void const * upcast(void const * const t) const { - const Base * b = + void const * upcast(void const * const t) const BOOST_OVERRIDE { + const Base * b = dynamic_cast<const Base *>( static_cast<const Derived *>(t) ); return b; } void_caster_virtual_base(); - virtual ~void_caster_virtual_base(); + ~void_caster_virtual_base() BOOST_OVERRIDE; }; #ifdef BOOST_MSVC @@ -230,8 +234,8 @@ public: template <class Derived, class Base> void_caster_virtual_base<Derived,Base>::void_caster_virtual_base() : - void_caster( - & (type_info_implementation<Derived>::type::get_const_instance()), + void_caster( + & (type_info_implementation<Derived>::type::get_const_instance()), & (type_info_implementation<Base>::type::get_const_instance()) ) { @@ -259,12 +263,12 @@ struct BOOST_SYMBOL_VISIBLE void_caster_base : >::type type; }; -} // void_cast_detail +} // void_cast_detail template<class Derived, class Base> -BOOST_DLLEXPORT +BOOST_DLLEXPORT inline const void_cast_detail::void_caster & void_cast_register( - Derived const * /* dnull = NULL */, + Derived const * /* dnull = NULL */, Base const * /* bnull = NULL */ ){ typedef @@ -289,8 +293,8 @@ class BOOST_SYMBOL_VISIBLE void_caster : } // namespace serialization } // namespace boost -#ifdef BOOST_MSVC -# pragma warning(pop) +#ifdef BOOST_MSVC +# pragma warning(pop) #endif #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/void_cast_fwd.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/void_cast_fwd.hpp index def61d52bb..87cc07f5b1 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/void_cast_fwd.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/void_cast_fwd.hpp @@ -9,7 +9,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // void_cast_fwd.hpp: interface for run-time casting of void pointers. -// (C) Copyright 2005 Robert Ramey - http://www.rrsd.com . +// (C) Copyright 2005 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) @@ -26,9 +26,9 @@ namespace void_cast_detail{ class void_caster; } // namespace void_cast_detail template<class Derived, class Base> -BOOST_DLLEXPORT +BOOST_DLLEXPORT inline const void_cast_detail::void_caster & void_cast_register( - const Derived * dnull = NULL, + const Derived * dnull = NULL, const Base * bnull = NULL ) BOOST_USED; } // namespace serialization diff --git a/contrib/restricted/boost/serialization/include/boost/serialization/wrapper.hpp b/contrib/restricted/boost/serialization/include/boost/serialization/wrapper.hpp index 60d7910b17..659e45b1db 100644 --- a/contrib/restricted/boost/serialization/include/boost/serialization/wrapper.hpp +++ b/contrib/restricted/boost/serialization/include/boost/serialization/wrapper.hpp @@ -17,17 +17,17 @@ namespace boost { namespace serialization { /// /// wrappers need to be treated differently at various places in the serialization library, /// e.g. saving of non-const wrappers has to be possible. Since partial specialization -// is not supported by all compilers, we derive all wrappers from wrapper_traits. +// is not supported by all compilers, we derive all wrappers from wrapper_traits. template< - class T, - int Level = object_serializable, + class T, + int Level = object_serializable, int Tracking = track_never, unsigned int Version = 0, class ETII = extended_type_info_impl< T > > -struct wrapper_traits : - public traits<T,Level,Tracking,Version,ETII,mpl::true_> +struct wrapper_traits : + public traits<T,Level,Tracking,Version,ETII,mpl::true_> {}; template<class T> diff --git a/contrib/restricted/boost/serialization/src/basic_archive.cpp b/contrib/restricted/boost/serialization/src/basic_archive.cpp index 6c3386e7a3..a57fe31caf 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 a5455a530a..5a8f1a9df2 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 653260c33b..695bdf7bcf 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 624afc2161..2011e77b58 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 364fe56d84..f86a4a2c94 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 7413d2e3a4..f0fc5554cb 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 0000000000..7fcca705a8 --- /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 0000000000..8b66c5cb53 --- /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 0000000000..6404ec83b8 --- /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 0000000000..4160a621a8 --- /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 0000000000..2089195a37 --- /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 0000000000..514f144778 --- /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 0000000000..17ec7917dc --- /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 0000000000..124f899f92 --- /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 0000000000..1548c9ed94 --- /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 0000000000..4798945665 --- /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 405130306c..261e4bcc94 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; |