diff options
| author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
| commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
| tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/archive | |
| parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
| download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 | |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/archive')
85 files changed, 869 insertions, 959 deletions
diff --git a/3rdParty/Boost/src/boost/archive/add_facet.hpp b/3rdParty/Boost/src/boost/archive/add_facet.hpp index 6bafe9b..242bdd9 100644 --- a/3rdParty/Boost/src/boost/archive/add_facet.hpp +++ b/3rdParty/Boost/src/boost/archive/add_facet.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/archive_exception.hpp b/3rdParty/Boost/src/boost/archive/archive_exception.hpp index b5f33f6..ffb430c 100644 --- a/3rdParty/Boost/src/boost/archive/archive_exception.hpp +++ b/3rdParty/Boost/src/boost/archive/archive_exception.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -44,9 +44,11 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) archive_exception : public virtual std::exception { +protected: + char m_buffer[128]; public: typedef enum { no_exception, // initialized without code other_exception, // any excepton not listed below - unregistered_class, // attempt to serialize a pointer of an + unregistered_class, // attempt to serialize a pointer of // an unregistered class invalid_signature, // first line of archive does not contain @@ -56,6 +58,6 @@ public: pointer_conflict, // an attempt has been made to directly // serialize an object which has - // already been serialzed through a pointer. - // Were this permited, the archive load would result + // already been serialized through a pointer. + // Were this permitted, the archive load would result // in the creation of an extra copy of the obect. incompatible_native_format, // attempt to read native binary format @@ -69,5 +71,5 @@ public: // void_cast_register unsupported_class_version, // type saved with a version # greater than the - // one used by the program. This indicates that the proggram + // one used by the program. This indicates that the program // needs to be rebuilt. multiple_code_instantiation, // code for implementing serialization for some @@ -75,6 +77,4 @@ public: output_stream_error // error on input stream } exception_code; -protected: - std::string m_msg; public: exception_code code; @@ -84,7 +84,9 @@ public: const char * e2 = NULL ); - ~archive_exception() throw (); - virtual const char *what( ) const throw(); + virtual ~archive_exception() throw(); + virtual const char *what() const throw(); protected: + unsigned int + append(unsigned int l, const char * a); archive_exception(); }; diff --git a/3rdParty/Boost/src/boost/archive/basic_archive.hpp b/3rdParty/Boost/src/boost/archive/basic_archive.hpp index c5ac880..0412112 100644 --- a/3rdParty/Boost/src/boost/archive/basic_archive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_archive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -16,5 +16,5 @@ // See http://www.boost.org for updates, documentation, and revision history. - +#include <cstring> // count #include <boost/assert.hpp> #include <boost/config.hpp> @@ -222,4 +222,7 @@ struct class_name_type : return t; } + std::size_t size() const { + return std::strlen(t); + } explicit class_name_type(const char *key_) : t(const_cast<char *>(key_)){} diff --git a/3rdParty/Boost/src/boost/archive/basic_binary_iarchive.hpp b/3rdParty/Boost/src/boost/archive/basic_binary_iarchive.hpp index d851dab..a649d5e 100644 --- a/3rdParty/Boost/src/boost/archive/basic_binary_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_binary_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -45,4 +45,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + ///////////////////////////////////////////////////////////////////////// // class basic_binary_iarchive - read serialized objects from a input binary stream @@ -51,13 +55,15 @@ class basic_binary_iarchive : public detail::common_iarchive<Archive> { -protected: -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: -#elif defined(BOOST_MSVC) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_iarchive<Archive>; #else - friend class detail::interface_iarchive<Archive>; +protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + #else + friend class detail::interface_iarchive<Archive>; + #endif #endif // intermediate level to support override of operators diff --git a/3rdParty/Boost/src/boost/archive/basic_binary_iprimitive.hpp b/3rdParty/Boost/src/boost/archive/basic_binary_iprimitive.hpp index fc27123..2e72a1c 100644 --- a/3rdParty/Boost/src/boost/archive/basic_binary_iprimitive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_binary_iprimitive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -127,5 +127,5 @@ public: #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) struct apply { - typedef BOOST_DEDUCED_TYPENAME boost::serialization::is_bitwise_serializable< T >::type type; + typedef typename boost::serialization::is_bitwise_serializable< T >::type type; }; #else @@ -179,5 +179,5 @@ basic_binary_iprimitive<Archive, Elem, Tr>::load_binary( archive_exception(archive_exception::input_stream_error) ); - std::memcpy(static_cast<char*>(address) + (count - s), &t, s); + std::memcpy(static_cast<char*>(address) + (count - s), &t, static_cast<std::size_t>(s)); } } diff --git a/3rdParty/Boost/src/boost/archive/basic_binary_oarchive.hpp b/3rdParty/Boost/src/boost/archive/basic_binary_oarchive.hpp index 01622b9..f8b53e9 100644 --- a/3rdParty/Boost/src/boost/archive/basic_binary_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_binary_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -47,4 +47,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + ////////////////////////////////////////////////////////////////////// // class basic_binary_oarchive - write serialized objects to a binary output stream @@ -59,13 +63,15 @@ class basic_binary_oarchive : public archive::detail::common_oarchive<Archive> { -protected: -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: -#elif defined(BOOST_MSVC) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_oarchive<Archive>; #else - friend class detail::interface_oarchive<Archive>; +protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive<Archive>; + #else + friend class detail::interface_oarchive<Archive>; + #endif #endif // any datatype not specifed below will be handled by base class diff --git a/3rdParty/Boost/src/boost/archive/basic_binary_oprimitive.hpp b/3rdParty/Boost/src/boost/archive/basic_binary_oprimitive.hpp index 53e44e4..ba070cd 100644 --- a/3rdParty/Boost/src/boost/archive/basic_binary_oprimitive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_binary_oprimitive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -59,6 +59,5 @@ namespace archive { template<class Archive, class Elem, class Tr> -class basic_binary_oprimitive -{ +class basic_binary_oprimitive { #ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS friend class save_access; @@ -123,5 +122,5 @@ public: #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) struct apply { - typedef BOOST_DEDUCED_TYPENAME boost::serialization::is_bitwise_serializable< T >::type type; + typedef typename boost::serialization::is_bitwise_serializable< T >::type type; }; #else @@ -171,5 +170,5 @@ basic_binary_oprimitive<Archive, Elem, Tr>::save_binary( ); //os.write( - // static_cast<const BOOST_DEDUCED_TYPENAME OStream::char_type *>(address), + // static_cast<const typename OStream::char_type *>(address), // count //); diff --git a/3rdParty/Boost/src/boost/archive/basic_streambuf_locale_saver.hpp b/3rdParty/Boost/src/boost/archive/basic_streambuf_locale_saver.hpp index ca764e1..6bf8f71 100644 --- a/3rdParty/Boost/src/boost/archive/basic_streambuf_locale_saver.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_streambuf_locale_saver.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -51,5 +51,5 @@ public: : s_save_( s ), a_save_( s.getloc() ) {} - basic_streambuf_locale_saver( state_type &s, aspect_type const &a ) + explicit basic_streambuf_locale_saver( state_type &s, aspect_type const &a ) : s_save_( s ), a_save_( s.pubimbue(a) ) {} diff --git a/3rdParty/Boost/src/boost/archive/basic_text_iarchive.hpp b/3rdParty/Boost/src/boost/archive/basic_text_iarchive.hpp index 729d51a..0e78ff6 100644 --- a/3rdParty/Boost/src/boost/archive/basic_text_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_text_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -41,4 +41,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + ///////////////////////////////////////////////////////////////////////// // class basic_text_iarchive - read serialized objects from a input text stream @@ -47,13 +51,15 @@ class basic_text_iarchive : public detail::common_iarchive<Archive> { -protected: -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: -#elif defined(BOOST_MSVC) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_iarchive<Archive>; #else - friend class detail::interface_iarchive<Archive>; +protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + #else + friend class detail::interface_iarchive<Archive>; + #endif #endif // intermediate level to support override of operators diff --git a/3rdParty/Boost/src/boost/archive/basic_text_iprimitive.hpp b/3rdParty/Boost/src/boost/archive/basic_text_iprimitive.hpp index b927ec9..dabc3c8 100644 --- a/3rdParty/Boost/src/boost/archive/basic_text_iprimitive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_text_iprimitive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -65,11 +65,6 @@ namespace archive { template<class IStream> -class basic_text_iprimitive -{ -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +class basic_text_iprimitive { protected: -#else -public: -#endif IStream &is; io::ios_flags_saver flags_saver; @@ -79,6 +74,6 @@ public: boost::scoped_ptr<std::locale> archive_locale; basic_streambuf_locale_saver< - BOOST_DEDUCED_TYPENAME IStream::char_type, - BOOST_DEDUCED_TYPENAME IStream::traits_type + typename IStream::char_type, + typename IStream::traits_type > locale_saver; #endif @@ -87,8 +82,6 @@ public: void load(T & t) { - if(! is.fail()){ - is >> t; + if(is >> t) return; - } boost::serialization::throw_exception( archive_exception(archive_exception::input_stream_error) diff --git a/3rdParty/Boost/src/boost/archive/basic_text_oarchive.hpp b/3rdParty/Boost/src/boost/archive/basic_text_oarchive.hpp index dd10f65..bed9cd3 100644 --- a/3rdParty/Boost/src/boost/archive/basic_text_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_text_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -43,4 +43,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + ///////////////////////////////////////////////////////////////////////// // class basic_text_oarchive @@ -49,15 +53,17 @@ class basic_text_oarchive : public detail::common_oarchive<Archive> { -protected: -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ -|| BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x560)) +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: -#elif defined(BOOST_MSVC) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_oarchive<Archive>; #else - friend class detail::interface_oarchive<Archive>; +protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive<Archive>; + #else + friend class detail::interface_oarchive<Archive>; + #endif #endif + enum { none, diff --git a/3rdParty/Boost/src/boost/archive/basic_text_oprimitive.hpp b/3rdParty/Boost/src/boost/archive/basic_text_oprimitive.hpp index 06885ad..73a0a62 100644 --- a/3rdParty/Boost/src/boost/archive/basic_text_oprimitive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_text_oprimitive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -27,5 +27,4 @@ #include <iomanip> #include <locale> -#include <boost/config/no_tr1/cmath.hpp> // isnan #include <boost/assert.hpp> #include <cstddef> // size_t @@ -34,4 +33,6 @@ #include <boost/static_assert.hpp> #include <boost/detail/workaround.hpp> +#include <boost/io/ios_state.hpp> + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) #include <boost/archive/dinkumware.hpp> @@ -47,4 +48,6 @@ namespace std{ #endif +#include <boost/type_traits/is_floating_point.hpp> +#include <boost/mpl/bool.hpp> #include <boost/limits.hpp> #include <boost/integer.hpp> @@ -66,9 +69,5 @@ template<class OStream> class basic_text_oprimitive { -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS protected: -#else -public: -#endif OStream &os; io::ios_flags_saver flags_saver; @@ -78,19 +77,9 @@ public: boost::scoped_ptr<std::locale> archive_locale; basic_streambuf_locale_saver< - BOOST_DEDUCED_TYPENAME OStream::char_type, - BOOST_DEDUCED_TYPENAME OStream::traits_type + typename OStream::char_type, + typename OStream::traits_type > locale_saver; #endif - // default saving of primitives. - template<class T> - void save(const T &t){ - if(os.fail()) - boost::serialization::throw_exception( - archive_exception(archive_exception::output_stream_error) - ); - os << t; - } - ///////////////////////////////////////////////////////// // fundamental types that need special treatment @@ -124,16 +113,40 @@ public: } #endif - void save(const float t) - { - // must be a user mistake - can't serialize un-initialized data + + ///////////////////////////////////////////////////////// + // saving of any types not listed above + + template<class T> + void save_impl(const T &t, boost::mpl::bool_<false> &){ if(os.fail()) boost::serialization::throw_exception( archive_exception(archive_exception::output_stream_error) ); - os << std::setprecision(std::numeric_limits<float>::digits10 + 2); os << t; } - void save(const double t) - { + + ///////////////////////////////////////////////////////// + // floating point types need even more special treatment + // the following determines whether the type T is some sort + // of floating point type. Note that we then assume that + // the stream << operator is defined on that type - if not + // we'll get a compile time error. This is meant to automatically + // support synthesized types which support floating point + // operations. Also it should handle compiler dependent types + // such long double. Due to John Maddock. + + template<class T> + struct is_float { + 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) + >::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()) @@ -141,7 +154,27 @@ public: archive_exception(archive_exception::output_stream_error) ); - os << std::setprecision(std::numeric_limits<double>::digits10 + 2); - os << t; + // 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: + // www.eecs.berkeley.edu/~wkahan/ieee754status/ieee754.ps + // const unsigned int digits = (std::numeric_limits<T>::digits * 3010) / 10000; + // note: I've commented out the above because I didn't get good results. e.g. + // in one case I got a difference of 19 units. + #ifndef BOOST_NO_CXX11_NUMERIC_LIMITS + const unsigned int digits = std::numeric_limits<T>::max_digits10; + #else + const unsigned int digits = std::numeric_limits<T>::digits10 + 2; + #endif + os << std::setprecision(digits) << std::scientific << t; } + + template<class T> + void save(const T & t){ + boost::io::ios_flags_saver fs(os); + boost::io::ios_precision_saver ps(os); + typename is_float<T>::type tf; + save_impl(t, tf); + } + BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_text_oprimitive(OStream & os, bool no_codecvt); @@ -150,5 +183,5 @@ public: public: // unformatted append of one character - void put(BOOST_DEDUCED_TYPENAME OStream::char_type c){ + void put(typename OStream::char_type c){ if(os.fail()) boost::serialization::throw_exception( diff --git a/3rdParty/Boost/src/boost/archive/basic_xml_archive.hpp b/3rdParty/Boost/src/boost/archive/basic_xml_archive.hpp index c99d94f..a4ad3a2 100644 --- a/3rdParty/Boost/src/boost/archive/basic_xml_archive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_xml_archive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/basic_xml_iarchive.hpp b/3rdParty/Boost/src/boost/archive/basic_xml_iarchive.hpp index d7b8bfd..5047fef 100644 --- a/3rdParty/Boost/src/boost/archive/basic_xml_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_xml_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -38,4 +38,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + ///////////////////////////////////////////////////////////////////////// // class xml_iarchive - read serialized objects from a input text stream @@ -44,13 +48,15 @@ class basic_xml_iarchive : public detail::common_iarchive<Archive> { -protected: -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: -#elif defined(BOOST_MSVC) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_oarchive<Archive>; #else - friend class detail::interface_oarchive<Archive>; +protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + #else + friend class detail::interface_iarchive<Archive>; + #endif #endif unsigned int depth; diff --git a/3rdParty/Boost/src/boost/archive/basic_xml_oarchive.hpp b/3rdParty/Boost/src/boost/archive/basic_xml_oarchive.hpp index b571372..c986833 100644 --- a/3rdParty/Boost/src/boost/archive/basic_xml_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/basic_xml_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -37,4 +37,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + ////////////////////////////////////////////////////////////////////// // class basic_xml_oarchive - write serialized objects to a xml output stream @@ -43,16 +47,17 @@ class basic_xml_oarchive : public detail::common_oarchive<Archive> { -protected: -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) +#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS public: -#elif defined(BOOST_MSVC) +#else +protected: +#endif +#if BOOST_WORKAROUND(BOOST_MSVC, < 1500) // for some inexplicable reason insertion of "class" generates compile erro // on msvc 7.1 friend detail::interface_oarchive<Archive>; - friend class save_access; #else friend class detail::interface_oarchive<Archive>; - friend class save_access; #endif + friend class save_access; // special stuff for xml output unsigned int depth; diff --git a/3rdParty/Boost/src/boost/archive/binary_iarchive.hpp b/3rdParty/Boost/src/boost/archive/binary_iarchive.hpp index 638d996..ce67cca 100644 --- a/3rdParty/Boost/src/boost/archive/binary_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/binary_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -26,42 +26,5 @@ #endif -namespace boost { -namespace archive { - -// do not derive from the classes below. If you want to extend this functionality -// via inhertance, derived from text_iarchive_impl instead. This will -// preserve correct static polymorphism. - -// same as binary_iarchive below - without the shared_ptr_helper -class naked_binary_iarchive : - public binary_iarchive_impl< - boost::archive::naked_binary_iarchive, - std::istream::char_type, - std::istream::traits_type - > -{ -public: - naked_binary_iarchive(std::istream & is, unsigned int flags = 0) : - binary_iarchive_impl< - naked_binary_iarchive, std::istream::char_type, std::istream::traits_type - >(is, flags) - {} - naked_binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : - binary_iarchive_impl< - naked_binary_iarchive, std::istream::char_type, std::istream::traits_type - >(bsb, flags) - {} -}; - -} // namespace archive -} // namespace boost - -// note special treatment of shared_ptr. This type needs a special -// structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a -// special esteem in the boost library - we included it here by default. -#include <boost/archive/shared_ptr_helper.hpp> - -namespace boost { +namespace boost { namespace archive { @@ -74,7 +37,5 @@ class binary_iarchive : std::istream::char_type, std::istream::traits_type - >, - public detail::shared_ptr_helper -{ + >{ public: binary_iarchive(std::istream & is, unsigned int flags = 0) : diff --git a/3rdParty/Boost/src/boost/archive/binary_iarchive_impl.hpp b/3rdParty/Boost/src/boost/archive/binary_iarchive_impl.hpp index 32c476d..a9afe61 100644 --- a/3rdParty/Boost/src/boost/archive/binary_iarchive_impl.hpp +++ b/3rdParty/Boost/src/boost/archive/binary_iarchive_impl.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -30,4 +30,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + template<class Archive, class Elem, class Tr> class binary_iarchive_impl : @@ -38,8 +42,16 @@ class binary_iarchive_impl : public: #else - friend class detail::interface_iarchive<Archive>; - friend class basic_binary_iarchive<Archive>; - friend class load_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + friend basic_binary_iarchive<Archive>; + friend load_access; + #else + friend class detail::interface_iarchive<Archive>; + friend class basic_binary_iarchive<Archive>; + friend class load_access; + #endif #endif // note: the following should not needed - but one compiler (vc 7.1) diff --git a/3rdParty/Boost/src/boost/archive/binary_oarchive.hpp b/3rdParty/Boost/src/boost/archive/binary_oarchive.hpp index 2aac14f..89a86da 100644 --- a/3rdParty/Boost/src/boost/archive/binary_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/binary_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -51,6 +51,4 @@ public: }; -typedef binary_oarchive naked_binary_oarchive; - } // namespace archive } // namespace boost diff --git a/3rdParty/Boost/src/boost/archive/binary_oarchive_impl.hpp b/3rdParty/Boost/src/boost/archive/binary_oarchive_impl.hpp index 7ca773b..a8c9733 100644 --- a/3rdParty/Boost/src/boost/archive/binary_oarchive_impl.hpp +++ b/3rdParty/Boost/src/boost/archive/binary_oarchive_impl.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -31,4 +31,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + template<class Archive, class Elem, class Tr> class binary_oarchive_impl : @@ -39,8 +43,16 @@ class binary_oarchive_impl : public: #else - friend class detail::interface_oarchive<Archive>; - friend class basic_binary_oarchive<Archive>; - friend class save_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive<Archive>; + friend basic_binary_oarchive<Archive>; + friend save_access; + #else + friend class detail::interface_oarchive<Archive>; + friend class basic_binary_oarchive<Archive>; + friend class save_access; + #endif #endif // note: the following should not needed - but one compiler (vc 7.1) diff --git a/3rdParty/Boost/src/boost/archive/binary_wiarchive.hpp b/3rdParty/Boost/src/boost/archive/binary_wiarchive.hpp index b5f6a71..775d8f8 100644 --- a/3rdParty/Boost/src/boost/archive/binary_wiarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/binary_wiarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -29,41 +29,4 @@ namespace boost { namespace archive { -// same as binary_wiarchive below - without the shared_ptr_helper -class naked_binary_wiarchive : - public binary_iarchive_impl< - boost::archive::naked_binary_wiarchive, - std::wistream::char_type, - std::wistream::traits_type - > -{ -public: - naked_binary_wiarchive(std::wistream & is, unsigned int flags = 0) : - binary_iarchive_impl< - naked_binary_wiarchive, - std::wistream::char_type, - std::wistream::traits_type - >(is, flags) - {} - naked_binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) : - binary_iarchive_impl< - naked_binary_wiarchive, - std::wistream::char_type, - std::wistream::traits_type - >(bsb, flags) - {} -}; - -} // namespace archive -} // namespace boost - -// note special treatment of shared_ptr. This type needs a special -// structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a -// special esteem in the boost library - we included it here by default. -#include <boost/archive/shared_ptr_helper.hpp> - -namespace boost { -namespace archive { - class binary_wiarchive : public binary_iarchive_impl< diff --git a/3rdParty/Boost/src/boost/archive/binary_woarchive.hpp b/3rdParty/Boost/src/boost/archive/binary_woarchive.hpp index 2075dac..a8817d6 100644 --- a/3rdParty/Boost/src/boost/archive/binary_woarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/binary_woarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -50,6 +50,4 @@ public: }; -typedef binary_woarchive naked_binary_woarchive; - } // namespace archive } // namespace boost diff --git a/3rdParty/Boost/src/boost/archive/codecvt_null.hpp b/3rdParty/Boost/src/boost/archive/codecvt_null.hpp index 910b261..caeefee 100644 --- a/3rdParty/Boost/src/boost/archive/codecvt_null.hpp +++ b/3rdParty/Boost/src/boost/archive/codecvt_null.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/archive_serializer_map.hpp b/3rdParty/Boost/src/boost/archive/detail/archive_serializer_map.hpp index 6d2eec4..53fcae4 100644 --- a/3rdParty/Boost/src/boost/archive/detail/archive_serializer_map.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/archive_serializer_map.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/auto_link_archive.hpp b/3rdParty/Boost/src/boost/archive/detail/auto_link_archive.hpp index 05956f0..79b0e49 100644 --- a/3rdParty/Boost/src/boost/archive/detail/auto_link_archive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/auto_link_archive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/auto_link_warchive.hpp b/3rdParty/Boost/src/boost/archive/detail/auto_link_warchive.hpp index 4d4efcd..683d191 100644 --- a/3rdParty/Boost/src/boost/archive/detail/auto_link_warchive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/auto_link_warchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_iarchive.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_iarchive.hpp index f62987e..fdafbbf 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -23,8 +23,8 @@ #include <boost/noncopyable.hpp> -#include <boost/type_traits/broken_compiler_spec.hpp> #include <boost/serialization/tracking_enum.hpp> #include <boost/archive/basic_archive.hpp> #include <boost/archive/detail/decl.hpp> +#include <boost/archive/detail/helper_collection.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header @@ -43,5 +43,6 @@ class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_iserializer; // class basic_iarchive - read serialized objects from a input stream class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive : - private boost::noncopyable + private boost::noncopyable, + public boost::archive::detail::helper_collection { friend class basic_iarchive_impl; @@ -100,10 +101,4 @@ public: } // namespace boost -// required by smart_cast for compilers not implementing -// partial template specialization -BOOST_TT_BROKEN_COMPILER_SPEC( - boost::archive::detail::basic_iarchive -) - #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_iserializer.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_iserializer.hpp index 2f4f6d8..3bff3e1 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_iserializer.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_iserializer.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_oarchive.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_oarchive.hpp index 402e569..f65d110 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -21,6 +21,4 @@ #include <boost/noncopyable.hpp> -#include <boost/type_traits/broken_compiler_spec.hpp> - // can't use this - much as I'd like to as borland doesn't support it // #include <boost/scoped_ptr.hpp> @@ -28,5 +26,5 @@ #include <boost/archive/basic_archive.hpp> #include <boost/serialization/tracking_enum.hpp> - +#include <boost/archive/detail/helper_collection.hpp> #include <boost/archive/detail/abi_prefix.hpp> // must be the last header @@ -42,8 +40,10 @@ class basic_oarchive_impl; class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oserializer; class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_pointer_oserializer; + ////////////////////////////////////////////////////////////////////// // class basic_oarchive - write serialized objects to an output stream class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_oarchive : - private boost::noncopyable + private boost::noncopyable, + public boost::archive::detail::helper_collection { friend class basic_oarchive_impl; @@ -96,10 +96,4 @@ public: } // namespace boost -// required by smart_cast for compilers not implementing -// partial template specialization -BOOST_TT_BROKEN_COMPILER_SPEC( - boost::archive::detail::basic_oarchive -) - #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_oserializer.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_oserializer.hpp index 74af7e6..6ae063f 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_oserializer.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_oserializer.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_pointer_iserializer.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_pointer_iserializer.hpp index d957b83..86badc1 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_pointer_iserializer.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_pointer_iserializer.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -53,8 +53,9 @@ protected: ~basic_pointer_iserializer(); public: + virtual void * heap_allocation() const = 0; virtual const basic_iserializer & get_basic_serializer() const = 0; virtual void load_object_ptr( basic_iarchive & ar, - void * & x, + void * x, const unsigned int file_version ) const = 0; diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_pointer_oserializer.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_pointer_oserializer.hpp index b0d3fb9..bafc46a 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_pointer_oserializer.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_pointer_oserializer.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_serializer.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_serializer.hpp index 5dbd886..c7d3b4b 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_serializer.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_serializer.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/basic_serializer_map.hpp b/3rdParty/Boost/src/boost/archive/detail/basic_serializer_map.hpp index a991ea1..202c20e 100644 --- a/3rdParty/Boost/src/boost/archive/detail/basic_serializer_map.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/basic_serializer_map.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/check.hpp b/3rdParty/Boost/src/boost/archive/detail/check.hpp index c9cba51..10034e7 100644 --- a/3rdParty/Boost/src/boost/archive/detail/check.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/check.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #pragma inline_depth(511) @@ -51,5 +51,5 @@ template<class T> inline void check_object_level(){ typedef - BOOST_DEDUCED_TYPENAME mpl::greater_equal< + typename mpl::greater_equal< serialization::implementation_level< T >, mpl::int_<serialization::primitive_type> @@ -64,10 +64,10 @@ template<class T> inline void check_object_versioning(){ typedef - BOOST_DEDUCED_TYPENAME mpl::or_< - BOOST_DEDUCED_TYPENAME mpl::greater< + typename mpl::or_< + typename mpl::greater< serialization::implementation_level< T >, mpl::int_<serialization::object_serializable> >, - BOOST_DEDUCED_TYPENAME mpl::equal_to< + typename mpl::equal_to< serialization::version< T >, mpl::int_<0> @@ -84,5 +84,5 @@ inline void check_object_tracking(){ // T is not a const BOOST_STATIC_ASSERT(! boost::is_const< T >::value); - typedef BOOST_DEDUCED_TYPENAME mpl::equal_to< + typedef typename mpl::equal_to< serialization::tracking_level< T >, mpl::int_<serialization::track_never> @@ -106,11 +106,11 @@ inline void check_pointer_level(){ // has been used as a pointer!! typedef - BOOST_DEDUCED_TYPENAME mpl::or_< - BOOST_DEDUCED_TYPENAME mpl::greater< + typename mpl::or_< + typename mpl::greater< serialization::implementation_level< T >, mpl::int_<serialization::object_serializable> >, - BOOST_DEDUCED_TYPENAME mpl::not_< - BOOST_DEDUCED_TYPENAME mpl::equal_to< + typename mpl::not_< + typename mpl::equal_to< serialization::tracking_level< T >, mpl::int_<serialization::track_selectively> @@ -140,5 +140,5 @@ inline void check_pointer_level(){ template<class T> void inline check_pointer_tracking(){ - typedef BOOST_DEDUCED_TYPENAME mpl::greater< + typedef typename mpl::greater< serialization::tracking_level< T >, mpl::int_<serialization::track_never> @@ -152,8 +152,8 @@ template<class T> inline void check_const_loading(){ typedef - BOOST_DEDUCED_TYPENAME mpl::or_< - BOOST_DEDUCED_TYPENAME boost::serialization::is_wrapper< T >, - BOOST_DEDUCED_TYPENAME mpl::not_< - BOOST_DEDUCED_TYPENAME boost::is_const< T > + typename mpl::or_< + typename boost::serialization::is_wrapper< T >, + typename mpl::not_< + typename boost::is_const< T > > >::type typex; diff --git a/3rdParty/Boost/src/boost/archive/detail/common_iarchive.hpp b/3rdParty/Boost/src/boost/archive/detail/common_iarchive.hpp index 54c07c3..45e6d34 100644 --- a/3rdParty/Boost/src/boost/archive/detail/common_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/common_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/common_oarchive.hpp b/3rdParty/Boost/src/boost/archive/detail/common_oarchive.hpp index 7962063..0d7474b 100644 --- a/3rdParty/Boost/src/boost/archive/detail/common_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/common_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/decl.hpp b/3rdParty/Boost/src/boost/archive/detail/decl.hpp index 9695001..44e22be 100644 --- a/3rdParty/Boost/src/boost/archive/detail/decl.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/decl.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/helper_collection.hpp b/3rdParty/Boost/src/boost/archive/detail/helper_collection.hpp new file mode 100644 index 0000000..ba3c60c --- /dev/null +++ b/3rdParty/Boost/src/boost/archive/detail/helper_collection.hpp @@ -0,0 +1,111 @@ +#ifndef BOOST_ARCHIVE_DETAIL_HELPER_COLLECTION_HPP +#define BOOST_ARCHIVE_DETAIL_HELPER_COLLECTION_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// helper_collection.hpp: archive support for run-time helpers + +// (C) Copyright 2002-2008 Robert Ramey and Joaquin M Lopez Munoz +// 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 <cstddef> // NULL +#include <typeinfo> +#include <vector> +#include <utility> +#include <memory> +#include <algorithm> + +#include <boost/config.hpp> + +#ifdef BOOST_NO_CXX11_SMART_PTR + #include <boost/smart_ptr/shared_ptr.hpp> + #include <boost/smart_ptr/make_shared.hpp> +#endif + +namespace boost { + +namespace archive { +namespace detail { + +class helper_collection +{ + helper_collection(const helper_collection&); // non-copyable + helper_collection& operator = (const helper_collection&); // non-copyable + + // note: we dont' actually "share" the function object pointer + // we only use shared_ptr to make sure that it get's deleted + + #ifndef BOOST_NO_CXX11_SMART_PTR + typedef std::pair< + const std::type_info *, + std::shared_ptr<void> + > helper_value_type; + template<class T> + std::shared_ptr<void> make_helper_ptr(){ + return std::make_shared<T>(); + } + #else + typedef std::pair< + const std::type_info *, + boost::shared_ptr<void> + > helper_value_type; + template<class T> + boost::shared_ptr<void> make_helper_ptr(){ + return boost::make_shared<T>(); + } + #endif + typedef std::vector<helper_value_type> collection; + collection m_collection; + + struct predicate { + const std::type_info * m_ti; + bool operator()(helper_value_type const &rhs) const { + return *m_ti == *rhs.first; + } + predicate(const std::type_info * ti) : + m_ti(ti) + {} + }; +protected: + helper_collection(){} + ~helper_collection(){} +public: + template<typename Helper> + Helper& get_helper(Helper * = NULL) { + + const std::type_info * eti = & typeid(Helper); + + collection::const_iterator it = + std::find_if( + m_collection.begin(), + m_collection.end(), + predicate(eti) + ); + + void * rval; + if(it == m_collection.end()){ + m_collection.push_back( + std::make_pair(eti, make_helper_ptr<Helper>()) + ); + rval = m_collection.back().second.get(); + } + else{ + rval = it->second.get(); + } + return *static_cast<Helper *>(rval); + } +}; + +} // namespace detail +} // namespace serialization +} // namespace boost + +#endif // BOOST_ARCHIVE_DETAIL_HELPER_COLLECTION_HPP diff --git a/3rdParty/Boost/src/boost/archive/detail/interface_iarchive.hpp b/3rdParty/Boost/src/boost/archive/detail/interface_iarchive.hpp index 0648752..b7bd165 100644 --- a/3rdParty/Boost/src/boost/archive/detail/interface_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/interface_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/interface_oarchive.hpp b/3rdParty/Boost/src/boost/archive/detail/interface_oarchive.hpp index e8db7a2..7ae7176 100644 --- a/3rdParty/Boost/src/boost/archive/detail/interface_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/interface_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/detail/iserializer.hpp b/3rdParty/Boost/src/boost/archive/detail/iserializer.hpp index 53765af..cf547de 100644 --- a/3rdParty/Boost/src/boost/archive/detail/iserializer.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/iserializer.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #pragma inline_depth(511) @@ -24,5 +24,4 @@ #include <new> // for placement new -#include <memory> // for auto_ptr #include <cstddef> // size_t, NULL @@ -60,12 +59,9 @@ namespace std{ #include <boost/serialization/assume_abstract.hpp> -#define DONT_USE_HAS_NEW_OPERATOR ( \ +#if ! ( \ defined(__BORLANDC__) \ || BOOST_WORKAROUND(__IBMCPP__, < 1210) \ - || defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) \ || defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \ ) - -#if ! DONT_USE_HAS_NEW_OPERATOR #include <boost/type_traits/has_new_operator.hpp> #endif @@ -128,5 +124,5 @@ protected: basic_iserializer( boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() @@ -198,62 +194,59 @@ BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data( #endif -template<class Archive, class T> -class pointer_iserializer : - public basic_pointer_iserializer -{ -private: - virtual const basic_iserializer & get_basic_serializer() const { - return boost::serialization::singleton< - iserializer<Archive, T> - >::get_const_instance(); - } - BOOST_DLLEXPORT virtual void load_object_ptr( - basic_iarchive & ar, - void * & x, - const unsigned int file_version - ) const BOOST_USED; -protected: - // this should alway be a singleton so make the constructor protected - pointer_iserializer(); - ~pointer_iserializer(); -}; - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -// note trick to be sure that operator new is using class specific -// version if such exists. Due to Peter Dimov. -// note: the following fails if T has no default constructor. -// otherwise it would have been ideal -//struct heap_allocator : public T -//{ -// T * invoke(){ -// return ::new(sizeof(T)); -// } -//} +// 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". +// 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 +// operator is also defined for the class T. template<class T> -struct heap_allocator -{ +struct heap_allocation { // boost::has_new_operator< T > doesn't work on these compilers #if DONT_USE_HAS_NEW_OPERATOR // This doesn't handle operator new overload for class T - static T * invoke(){ + static T * invoke_new(){ return static_cast<T *>(operator new(sizeof(T))); } + static viod invoke_delete(){ + (operator delete(sizeof(T))); + } #else + // note: we presume that a true value for has_new_operator + // implies the existence of a class specific delete operator as well + // as a class specific new operator. struct has_new_operator { - static T* invoke() { + static T * invoke_new() { return static_cast<T *>((T::operator new)(sizeof(T))); } + static void invoke_delete(T * t) { + // if compilation fails here, the likely cause that the class + // T has a class specific new operator but no class specific + // delete operator which matches the following signature. Fix + // your program to have this. Note that adding operator delete + // with only one parameter doesn't seem correct to me since + // the standard(3.7.4.2) says " + // "If a class T has a member deallocation function named + // 'operator delete' with exactly one parameter, then that function + // is a usual (non-placement) deallocation function" which I take + // to mean that it will call the destructor of type T which we don't + // want to do here. + // Note: reliance upon automatic conversion from T * to void * here + (T::operator delete)(t, sizeof(T)); + } }; struct doesnt_have_new_operator { - static T* invoke() { + static T* invoke_new() { return static_cast<T *>(operator new(sizeof(T))); } + static void invoke_delete(T * t) { + // Note: I'm reliance upon automatic conversion from T * to void * here + (operator delete)(t); + } }; - static T * invoke() { - typedef BOOST_DEDUCED_TYPENAME + static T * invoke_new() { + typedef typename mpl::eval_if< boost::has_new_operator< T >, @@ -261,20 +254,22 @@ struct heap_allocator mpl::identity<doesnt_have_new_operator > >::type typex; - return typex::invoke(); + return typex::invoke_new(); + } + static void invoke_delete(T *t) { + typedef typename + mpl::eval_if< + boost::has_new_operator< T >, + mpl::identity<has_new_operator >, + mpl::identity<doesnt_have_new_operator > + >::type typex; + typex::invoke_delete(t); } #endif -}; - -// due to Martin Ecker -template <typename T> -class auto_ptr_with_deleter -{ -public: - explicit auto_ptr_with_deleter(T* p) : - m_p(p) - {} - ~auto_ptr_with_deleter(){ - if (m_p) - boost::serialization::access::destroy(m_p); + explicit heap_allocation(){ + m_p = invoke_new(); + } + ~heap_allocation(){ + if (0 != m_p) + invoke_delete(m_p); } T* get() const { @@ -284,5 +279,5 @@ public: T* release() { T* p = m_p; - m_p = NULL; + m_p = 0; return p; } @@ -291,4 +286,35 @@ private: }; +template<class Archive, class T> +class pointer_iserializer : + public basic_pointer_iserializer +{ +private: + virtual void * heap_allocation() const { + detail::heap_allocation<T> h; + T * t = h.get(); + h.release(); + return t; + } + virtual const basic_iserializer & get_basic_serializer() const { + return boost::serialization::singleton< + iserializer<Archive, T> + >::get_const_instance(); + } + BOOST_DLLEXPORT virtual void load_object_ptr( + basic_iarchive & ar, + void * x, + const unsigned int file_version + ) const BOOST_USED; +protected: + // this should alway be a singleton so make the constructor protected + pointer_iserializer(); + ~pointer_iserializer(); +}; + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + // note: BOOST_DLLEXPORT is so that code for polymorphic class // serialized only through base class won't get optimized out @@ -296,5 +322,5 @@ template<class Archive, class T> BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr( basic_iarchive & ar, - void * & x, + void * t, const unsigned int file_version ) const @@ -303,10 +329,6 @@ BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr( boost::serialization::smart_cast_reference<Archive &>(ar); - auto_ptr_with_deleter< T > ap(heap_allocator< T >::invoke()); - if(NULL == ap.get()) - boost::serialization::throw_exception(std::bad_alloc()) ; - - T * t = ap.get(); - x = t; + // note that the above will throw std::bad_alloc if the allocation + // fails so we don't have to address this contingency here. // catch exception during load_construct_data so that we don't @@ -314,21 +336,22 @@ BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr( // constructed BOOST_TRY { - // this addresses an obscure situtation 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>( ar_impl, - t, + static_cast<T *>(t), file_version ); } BOOST_CATCH(...){ - ap.release(); + // if we get here the load_construct failed. The heap_allocation + // will be automatically deleted so we don't have to do anything + // special here. BOOST_RETHROW; } BOOST_CATCH_END - ar_impl >> boost::serialization::make_nvp(NULL, * t); - ap.release(); + ar_impl >> boost::serialization::make_nvp(NULL, * static_cast<T *>(t)); } @@ -337,5 +360,5 @@ pointer_iserializer<Archive, T>::pointer_iserializer() : basic_pointer_iserializer( boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() @@ -406,5 +429,5 @@ struct load_non_pointer_type { template<class T> static void invoke(Archive & ar, T &t){ - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< // if its primitive mpl::equal_to< @@ -414,5 +437,5 @@ struct load_non_pointer_type { mpl::identity<load_primitive>, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< // class info / version mpl::greater_equal< @@ -423,5 +446,5 @@ struct load_non_pointer_type { mpl::identity<load_standard>, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< // no tracking mpl::equal_to< @@ -467,5 +490,5 @@ struct load_pointer_type { // permits abstract base classes to be used - note: exception // virtual serialize functions used for plug-ins - typedef BOOST_DEDUCED_TYPENAME + typedef typename mpl::eval_if< boost::serialization::is_abstract<const T>, @@ -483,16 +506,19 @@ struct load_pointer_type { ) { // tweak the pointer back to the base class - return static_cast<T *>( - const_cast<void *>( - boost::serialization::void_upcast( - eti, - boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME - boost::serialization::type_info_implementation< T >::type - >::get_const_instance(), - t - ) + void * upcast = const_cast<void *>( + boost::serialization::void_upcast( + eti, + boost::serialization::singleton< + typename + boost::serialization::type_info_implementation< T >::type + >::get_const_instance(), + t ) ); + if(NULL == upcast) + boost::serialization::throw_exception( + archive_exception(archive_exception::unregistered_class) + ); + return static_cast<T *>(upcast); } @@ -545,5 +571,5 @@ struct load_array_type { template<class T> static void invoke(Archive &ar, T &t){ - typedef BOOST_DEDUCED_TYPENAME remove_extent< T >::type value_type; + typedef typename remove_extent< T >::type value_type; // convert integers to correct enum to load @@ -577,11 +603,11 @@ inline void load(Archive & ar, T &t){ detail::check_const_loading< T >(); typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if<is_pointer< T >, + typename mpl::eval_if<is_pointer< T >, mpl::identity<detail::load_pointer_type<Archive> > ,//else - BOOST_DEDUCED_TYPENAME mpl::eval_if<is_array< T >, + typename mpl::eval_if<is_array< T >, mpl::identity<detail::load_array_type<Archive> > ,//else - BOOST_DEDUCED_TYPENAME mpl::eval_if<is_enum< T >, + typename mpl::eval_if<is_enum< T >, mpl::identity<detail::load_enum_type<Archive> > ,//else diff --git a/3rdParty/Boost/src/boost/archive/detail/oserializer.hpp b/3rdParty/Boost/src/boost/archive/detail/oserializer.hpp index 7d2694d..7a7e239 100644 --- a/3rdParty/Boost/src/boost/archive/detail/oserializer.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/oserializer.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #pragma inline_depth(511) @@ -107,5 +107,5 @@ public: basic_oserializer( boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() @@ -206,5 +206,5 @@ pointer_oserializer<Archive, T>::pointer_oserializer() : basic_pointer_oserializer( boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance() @@ -276,5 +276,5 @@ struct save_non_pointer_type { static void invoke(Archive & ar, const T & t){ typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< // if its primitive mpl::equal_to< @@ -284,5 +284,5 @@ struct save_non_pointer_type { mpl::identity<save_primitive>, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< // class info / version mpl::greater_equal< @@ -293,5 +293,5 @@ struct save_non_pointer_type { mpl::identity<save_standard>, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< // no tracking mpl::equal_to< @@ -343,5 +343,5 @@ struct save_pointer_type { // virtual serialize functions used for plug-ins typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< boost::serialization::is_abstract< T >, mpl::identity<abstract>, @@ -374,8 +374,8 @@ struct save_pointer_type { T & t ){ - BOOST_DEDUCED_TYPENAME + typename boost::serialization::type_info_implementation< T >::type const & i = boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME + typename boost::serialization::type_info_implementation< T >::type >::get_const_instance(); @@ -453,5 +453,5 @@ struct save_pointer_type { check_pointer_level< T >(); check_pointer_tracking< T >(); - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< is_polymorphic< T >, mpl::identity<polymorphic>, @@ -491,5 +491,5 @@ struct save_array_type template<class T> static void invoke(Archive &ar, const T &t){ - typedef BOOST_DEDUCED_TYPENAME boost::remove_extent< T >::type value_type; + typedef typename boost::remove_extent< T >::type value_type; save_access::end_preamble(ar); @@ -510,11 +510,11 @@ template<class Archive, class T> inline void save(Archive & ar, /*const*/ T &t){ typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if<is_pointer< T >, + typename mpl::eval_if<is_pointer< T >, mpl::identity<detail::save_pointer_type<Archive> >, //else - BOOST_DEDUCED_TYPENAME mpl::eval_if<is_enum< T >, + typename mpl::eval_if<is_enum< T >, mpl::identity<detail::save_enum_type<Archive> >, //else - BOOST_DEDUCED_TYPENAME mpl::eval_if<is_array< T >, + typename mpl::eval_if<is_array< T >, mpl::identity<detail::save_array_type<Archive> >, //else diff --git a/3rdParty/Boost/src/boost/archive/detail/register_archive.hpp b/3rdParty/Boost/src/boost/archive/detail/register_archive.hpp index e31ae46..81a19b9 100644 --- a/3rdParty/Boost/src/boost/archive/detail/register_archive.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/register_archive.hpp @@ -82,5 +82,5 @@ namespace boost { namespace archive { namespace detail { \ \ template <class Serializable> \ -BOOST_DEDUCED_TYPENAME _ptr_serialization_support<Archive, Serializable>::type \ +typename _ptr_serialization_support<Archive, Serializable>::type \ instantiate_ptr_serialization( Serializable*, Archive*, adl_tag ); \ \ diff --git a/3rdParty/Boost/src/boost/archive/detail/utf8_codecvt_facet.hpp b/3rdParty/Boost/src/boost/archive/detail/utf8_codecvt_facet.hpp index bd859ff..b2430d5 100644 --- a/3rdParty/Boost/src/boost/archive/detail/utf8_codecvt_facet.hpp +++ b/3rdParty/Boost/src/boost/archive/detail/utf8_codecvt_facet.hpp @@ -8,14 +8,16 @@ #define BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP -#define BOOST_UTF8_BEGIN_NAMESPACE \ - namespace boost { namespace archive { namespace detail { -#define BOOST_UTF8_DECL -#define BOOST_UTF8_END_NAMESPACE }}} +#ifdef BOOST_NO_CXX11_HDR_CODECVT + #define BOOST_UTF8_BEGIN_NAMESPACE \ + namespace boost { namespace archive { namespace detail { + #define BOOST_UTF8_DECL + #define BOOST_UTF8_END_NAMESPACE }}} -#include <boost/detail/utf8_codecvt_facet.hpp> - -#undef BOOST_UTF8_END_NAMESPACE -#undef BOOST_UTF8_DECL -#undef BOOST_UTF8_BEGIN_NAMESPACE + #include <boost/detail/utf8_codecvt_facet.hpp> + #undef BOOST_UTF8_END_NAMESPACE + #undef BOOST_UTF8_DECL + #undef BOOST_UTF8_BEGIN_NAMESPACE +#endif // BOOST_NO_CXX11_HDR_CODECVT #endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP + diff --git a/3rdParty/Boost/src/boost/archive/dinkumware.hpp b/3rdParty/Boost/src/boost/archive/dinkumware.hpp index bfa828d..90ba627 100644 --- a/3rdParty/Boost/src/boost/archive/dinkumware.hpp +++ b/3rdParty/Boost/src/boost/archive/dinkumware.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp index 8ea39f7..b8e7f45 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iarchive.ipp @@ -13,5 +13,5 @@ #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -52,4 +52,6 @@ basic_binary_iarchive<Archive>::init(){ // read signature in an archive version independent manner std::string file_signature; + + #if 0 // commented out since it interfers with derivation try { std::size_t l; @@ -70,4 +72,9 @@ basic_binary_iarchive<Archive>::init(){ file_signature = ""; } + #else + // https://svn.boost.org/trac/boost/ticket/7301 + * this->This() >> file_signature; + #endif + if(file_signature != BOOST_ARCHIVE_SIGNATURE()) boost::serialization::throw_exception( @@ -114,8 +121,5 @@ basic_binary_iarchive<Archive>::init(){ this->set_library_version(input_library_version); #else - #if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) - detail:: - #endif - basic_iarchive::set_library_version(input_library_version); + detail::basic_iarchive::set_library_version(input_library_version); #endif diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp index e0f5c2e..9e2340e 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_iprimitive.ipp @@ -29,4 +29,5 @@ namespace std{ #include <boost/archive/codecvt_null.hpp> #include <boost/archive/add_facet.hpp> +#include <boost/archive/basic_binary_iprimitive.hpp> namespace boost { diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp index dec2cd7..467fd6f 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oarchive.ipp @@ -13,5 +13,5 @@ #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp index 02b5ffa..509decb 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_binary_oprimitive.ipp @@ -32,4 +32,5 @@ namespace std{ using ::wcslen; } #include <boost/archive/add_facet.hpp> #include <boost/archive/codecvt_null.hpp> +#include <boost/archive/basic_binary_oprimitive.hpp> namespace boost { diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp index 0a246b7..8d364f9 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_iarchive.ipp @@ -12,5 +12,5 @@ #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -63,8 +63,5 @@ basic_text_iarchive<Archive>::init(void){ this->set_library_version(input_library_version); #else - #if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1200) - detail:: - #endif - basic_iarchive::set_library_version(input_library_version); + detail::basic_iarchive::set_library_version(input_library_version); #endif diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp index ad6a6d5..d0da284 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_iprimitive.ipp @@ -31,8 +31,8 @@ namespace std{ #include <boost/archive/iterators/transform_width.hpp> -namespace boost { +namespace boost { namespace archive { -namespace { +namespace detail { template<class CharType> bool is_whitespace(CharType c); @@ -49,5 +49,5 @@ namespace { } #endif -} +} // detail // translate base64 text into binary and copy into buffer @@ -59,5 +59,5 @@ basic_text_iprimitive<IStream>::load_binary( std::size_t count ){ - typedef BOOST_DEDUCED_TYPENAME IStream::char_type CharType; + typedef typename IStream::char_type CharType; if(0 == count) @@ -74,5 +74,5 @@ basic_text_iprimitive<IStream>::load_binary( ); // convert from base64 to binary - typedef BOOST_DEDUCED_TYPENAME + typedef typename iterators::transform_width< iterators::binary_from_base64< @@ -87,31 +87,29 @@ basic_text_iprimitive<IStream>::load_binary( > binary; - - binary ti_begin = binary( + + binary i = binary( BOOST_MAKE_PFTO_WRAPPER( iterators::istream_iterator<CharType>(is) ) ); - + char * caddr = static_cast<char *>(address); // take care that we don't increment anymore than necessary - while(--count > 0){ - *caddr++ = static_cast<char>(*ti_begin); - ++ti_begin; + while(count-- > 0){ + *caddr++ = static_cast<char>(*i++); } - *caddr++ = static_cast<char>(*ti_begin); - - iterators::istream_iterator<CharType> i; + + // skip over any excess input for(;;){ - BOOST_DEDUCED_TYPENAME IStream::int_type r; + typename IStream::int_type r; r = is.get(); if(is.eof()) break; - if(is_whitespace(static_cast<CharType>(r))) + if(detail::is_whitespace(static_cast<CharType>(r))) break; } } - + template<class IStream> BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) @@ -131,5 +129,5 @@ basic_text_iprimitive<IStream>::basic_text_iprimitive( add_facet( std::locale::classic(), - new codecvt_null<BOOST_DEDUCED_TYPENAME IStream::char_type> + new codecvt_null<typename IStream::char_type> ) ); diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp index 34e6995..4170c97 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_oarchive.ipp @@ -12,5 +12,5 @@ #include <cstring> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp b/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp index cacab61..33ab4a8 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_text_oprimitive.ipp @@ -10,4 +10,5 @@ #include <cstddef> // NULL +#include <algorithm> // std::copy #include <boost/serialization/pfto.hpp> @@ -31,5 +32,5 @@ basic_text_oprimitive<OStream>::save_binary( std::size_t count ){ - typedef BOOST_DEDUCED_TYPENAME OStream::char_type CharType; + typedef typename OStream::char_type CharType; if(0 == count) @@ -52,5 +53,5 @@ basic_text_oprimitive<OStream>::save_binary( > > - ,72 + ,76 ,const char // cwpro8 needs this > @@ -91,5 +92,5 @@ basic_text_oprimitive<OStream>::basic_text_oprimitive( add_facet( std::locale::classic(), - new codecvt_null<BOOST_DEDUCED_TYPENAME OStream::char_type> + new codecvt_null<typename OStream::char_type> ) ); diff --git a/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp b/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp index 807ed07..66ca1f0 100644 --- a/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp +++ b/3rdParty/Boost/src/boost/archive/impl/basic_xml_grammar.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -51,9 +51,4 @@ #include <boost/detail/workaround.hpp> -// supress noise -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) -# pragma warning (disable : 4786) // too long name, harmless warning -#endif - #include <boost/spirit/include/classic_rule.hpp> #include <boost/spirit/include/classic_chset.hpp> diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp index c7cbc7f..dc62eed 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_iarchive_impl.ipp @@ -99,7 +99,7 @@ xml_iarchive_impl<Archive>::load(wchar_t * ws){ while(start < end){ wchar_t wc; - int result = std::mbtowc(&wc, start, end - start); - if(0 < result){ - start += result; + int length = std::mbtowc(&wc, start, end - start); + if(0 < length){ + start += length; *ws++ = wc; continue; diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp index 8ab954f..ab1a217 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_oarchive_impl.ipp @@ -9,5 +9,5 @@ #include <ostream> #include <iomanip> -#include <algorithm> +#include <algorithm> // std::copy #include <string> diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp index 9dde66c..a4665ad 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_wiarchive_impl.ipp @@ -1,4 +1,4 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_wiprimitive.cpp: +// xml_wiarchive_impl.ipp: // (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . @@ -9,6 +9,4 @@ // See http://www.boost.org for updates, documentation, and revision history. -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME - #include <cstring> #if defined(BOOST_NO_STDC_NAMESPACE) @@ -22,5 +20,5 @@ namespace std{ #include <boost/assert.hpp> -#include <algorithm> +#include <algorithm> // std::copy #include <boost/detail/workaround.hpp> // Dinkumware and RogueWave @@ -35,7 +33,14 @@ namespace std{ #include <boost/serialization/string.hpp> #include <boost/archive/add_facet.hpp> -#include <boost/archive/xml_archive_exception.hpp> -#include <boost/archive/detail/utf8_codecvt_facet.hpp> +#ifndef BOOST_NO_CXX11_HDR_CODECVT + #include <codecvt> + namespace boost { namespace archive { namespace detail { + typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet; + } } } +#else + #include <boost/archive/detail/utf8_codecvt_facet.hpp> +#endif +#include <boost/archive/xml_archive_exception.hpp> #include <boost/archive/iterators/mb_from_wchar.hpp> @@ -168,5 +173,5 @@ xml_wiarchive_impl<Archive>::xml_wiarchive_impl( archive_locale.reset( add_facet( - std::locale::classic(), + is_.getloc(), new boost::archive::detail::utf8_codecvt_facet ) diff --git a/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp b/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp index 3bf42bd..6092a91 100644 --- a/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp +++ b/3rdParty/Boost/src/boost/archive/impl/xml_woarchive_impl.ipp @@ -12,13 +12,12 @@ #include <ostream> #include <string> -#include <algorithm> +#include <algorithm> // std::copy #include <locale> -#include <boost/config.hpp> // msvc 6.0 needs this to suppress warnings - // for BOOST_DEDUCED_TYPENAME #include <cstring> // strlen #include <cstdlib> // mbtowc #include <cwchar> // wcslen +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -40,5 +39,12 @@ namespace std{ #include <boost/archive/add_facet.hpp> -#include <boost/archive/detail/utf8_codecvt_facet.hpp> +#ifndef BOOST_NO_CXX11_HDR_CODECVT + #include <codecvt> + namespace boost { namespace archive { namespace detail { + typedef std::codecvt_utf8<wchar_t> utf8_codecvt_facet; + } } } +#else + #include <boost/archive/detail/utf8_codecvt_facet.hpp> +#endif namespace boost { @@ -129,18 +135,19 @@ xml_woarchive_impl<Archive>::xml_woarchive_impl( // b) after flush has been called. This prevents one-to-many // transforms (such as one to many transforms from getting - // mixed up. Unfortunately, STLPort doesn't respect b) above - // so the restoration of the original archive locale done by - // the locale_saver doesn't get processed, - // before the current one is destroyed. - // so the codecvt doesn't get replaced with the orginal - // so closing the stream invokes codecvt::do_unshift - // so it crashes because the corresponding locale that contained - // the codecvt isn't around any more. - // we can hack around this by using a static codecvt that never - // gets destroyed. + // mixed up. if(0 == (flags & no_codecvt)){ boost::archive::detail::utf8_codecvt_facet *pfacet; #if defined(__SGI_STL_PORT) - static boost::archive::detail::utf8_codecvt_facet + // Unfortunately, STLPort doesn't respect b) above + // so the restoration of the original archive locale done by + // the locale_saver doesn't get processed, + // before the current one is destroyed. + // so the codecvt doesn't get replaced with the orginal + // so closing the stream invokes codecvt::do_unshift + // so it crashes because the corresponding locale that contained + // the codecvt isn't around any more. + // we can hack around this by using a static codecvt that never + // gets destroyed. + static boost::archive::detail::utf8_codecvt_facet facet(static_cast<size_t>(1)); pfacet = & facet; @@ -148,5 +155,5 @@ xml_woarchive_impl<Archive>::xml_woarchive_impl( pfacet = new boost::archive::detail::utf8_codecvt_facet; #endif - archive_locale.reset(add_facet(std::locale::classic(), pfacet)); + archive_locale.reset(add_facet(os_.getloc(), pfacet)); os.imbue(* archive_locale); } diff --git a/3rdParty/Boost/src/boost/archive/iterators/base64_from_binary.hpp b/3rdParty/Boost/src/boost/archive/iterators/base64_from_binary.hpp index ecb916a..836d93d 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/base64_from_binary.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/base64_from_binary.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -20,5 +20,4 @@ #include <cstddef> // size_t -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -58,5 +57,5 @@ struct from_6_bit { // note: what we would like to do is -// template<class Base, class CharType = BOOST_DEDUCED_TYPENAME Base::value_type> +// template<class Base, class CharType = typename Base::value_type> // typedef transform_iterator< // from_6_bit<CharType>, @@ -70,8 +69,8 @@ struct from_6_bit { // ideal. This is also addressed here. -//template<class Base, class CharType = BOOST_DEDUCED_TYPENAME Base::value_type> +//template<class Base, class CharType = typename Base::value_type> template< class Base, - class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type + class CharType = typename boost::iterator_value<Base>::type > class base64_from_binary : @@ -83,5 +82,5 @@ class base64_from_binary : friend class boost::iterator_core_access; typedef transform_iterator< - BOOST_DEDUCED_TYPENAME detail::from_6_bit<CharType>, + typename detail::from_6_bit<CharType>, Base > super_t; diff --git a/3rdParty/Boost/src/boost/archive/iterators/binary_from_base64.hpp b/3rdParty/Boost/src/boost/archive/iterators/binary_from_base64.hpp index 60f23f3..9d2c87e 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/binary_from_base64.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/binary_from_base64.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -19,5 +19,4 @@ #include <boost/assert.hpp> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME #include <boost/serialization/throw_exception.hpp> #include <boost/serialization/pfto.hpp> @@ -44,5 +43,5 @@ struct to_6_bit { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, - 52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1, + 52,53,54,55,56,57,58,59,60,61,-1,-1,-1, 0,-1,-1, // render '=' as 0 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, 15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, @@ -68,5 +67,5 @@ struct to_6_bit { // note: what we would like to do is -// template<class Base, class CharType = BOOST_DEDUCED_TYPENAME Base::value_type> +// template<class Base, class CharType = typename Base::value_type> // typedef transform_iterator< // from_6_bit<CharType>, @@ -82,5 +81,5 @@ struct to_6_bit { template< class Base, - class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type + class CharType = typename boost::iterator_value<Base>::type > class binary_from_base64 : public diff --git a/3rdParty/Boost/src/boost/archive/iterators/dataflow_exception.hpp b/3rdParty/Boost/src/boost/archive/iterators/dataflow_exception.hpp index 1d655a1..e3e1860 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/dataflow_exception.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/dataflow_exception.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/iterators/escape.hpp b/3rdParty/Boost/src/boost/archive/iterators/escape.hpp index bb527d4..a1fee91 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/escape.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/escape.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -20,5 +20,4 @@ #include <cstddef> // NULL -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME #include <boost/iterator/iterator_adaptor.hpp> #include <boost/iterator/iterator_traits.hpp> @@ -36,14 +35,14 @@ class escape : Derived, Base, - BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type, + typename boost::iterator_value<Base>::type, single_pass_traversal_tag, - BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type + typename boost::iterator_value<Base>::type > { - typedef BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type base_value_type; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_reference<Base>::type reference_type; + typedef typename boost::iterator_value<Base>::type base_value_type; + typedef typename boost::iterator_reference<Base>::type reference_type; friend class boost::iterator_core_access; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + typedef typename boost::iterator_adaptor< Derived, Base, diff --git a/3rdParty/Boost/src/boost/archive/iterators/insert_linebreaks.hpp b/3rdParty/Boost/src/boost/archive/iterators/insert_linebreaks.hpp index 5f826ca..7fbc79f 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/insert_linebreaks.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/insert_linebreaks.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -19,5 +19,5 @@ #include <boost/assert.hpp> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::memcpy; } @@ -38,5 +38,5 @@ template< class Base, int N, - class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type + class CharType = typename boost::iterator_value<Base>::type > class insert_linebreaks : diff --git a/3rdParty/Boost/src/boost/archive/iterators/istream_iterator.hpp b/3rdParty/Boost/src/boost/archive/iterators/istream_iterator.hpp index 1df612d..41aa0be 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/istream_iterator.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/istream_iterator.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -42,5 +42,5 @@ class istream_iterator : friend class boost::iterator_core_access; typedef istream_iterator this_t ; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_facade< + typedef typename boost::iterator_facade< istream_iterator<Elem>, Elem, @@ -48,11 +48,6 @@ class istream_iterator : Elem > super_t; - typedef BOOST_DEDUCED_TYPENAME std::basic_istream<Elem> istream_type; + typedef typename std::basic_istream<Elem> istream_type; - //Access the value referred to - Elem dereference() const { - return m_current_value; - } - bool equal(const this_t & rhs) const { // note: only works for comparison against end of stream @@ -60,4 +55,10 @@ class istream_iterator : } +/* + //Access the value referred to + Elem dereference() const { + return m_current_value; + } + void increment(){ if(NULL != m_istream){ @@ -68,4 +69,15 @@ class istream_iterator : } } +*/ + //Access the value referred to + Elem dereference() const { + return m_istream->peek(); + } + + void increment(){ + if(NULL != m_istream){ + m_istream->ignore(1); + } + } istream_type *m_istream; @@ -75,5 +87,5 @@ public: m_istream(& is) { - increment(); + //increment(); } diff --git a/3rdParty/Boost/src/boost/archive/iterators/mb_from_wchar.hpp b/3rdParty/Boost/src/boost/archive/iterators/mb_from_wchar.hpp index d8f8a12..04e7c7e 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/mb_from_wchar.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/mb_from_wchar.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -21,5 +21,5 @@ #include <cstdlib> // for wctomb() -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -51,5 +51,5 @@ class mb_from_wchar friend class boost::iterator_core_access; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + typedef typename boost::iterator_adaptor< mb_from_wchar<Base>, Base, diff --git a/3rdParty/Boost/src/boost/archive/iterators/ostream_iterator.hpp b/3rdParty/Boost/src/boost/archive/iterators/ostream_iterator.hpp index 7c3203f..49a9b99 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/ostream_iterator.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/ostream_iterator.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/iterators/remove_whitespace.hpp b/3rdParty/Boost/src/boost/archive/iterators/remove_whitespace.hpp index a01049f..4383987 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/remove_whitespace.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/remove_whitespace.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -19,6 +19,4 @@ #include <boost/assert.hpp> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME - #include <boost/serialization/pfto.hpp> @@ -27,7 +25,4 @@ #include <boost/iterator/iterator_traits.hpp> -//#include <boost/detail/workaround.hpp> -//#if ! BOOST_WORKAROUND(BOOST_MSVC, <=1300) - // here is the default standard implementation of the functor used // by the filter iterator to remove spaces. Unfortunately usage @@ -54,6 +49,4 @@ namespace std{ using ::isspace; } #endif -//#endif // BOOST_WORKAROUND - namespace { // anonymous @@ -101,5 +94,5 @@ class filter_iterator { friend class boost::iterator_core_access; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + typedef typename boost::iterator_adaptor< filter_iterator<Predicate, Base>, Base, @@ -108,5 +101,5 @@ class filter_iterator > super_t; typedef filter_iterator<Predicate, Base> this_t; - typedef BOOST_DEDUCED_TYPENAME super_t::reference reference_type; + typedef typename super_t::reference reference_type; reference_type dereference_impl(){ @@ -143,6 +136,6 @@ class remove_whitespace : public filter_iterator< remove_whitespace_predicate< - BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type - //BOOST_DEDUCED_TYPENAME Base::value_type + typename boost::iterator_value<Base>::type + //typename Base::value_type >, Base @@ -152,6 +145,6 @@ class remove_whitespace : typedef filter_iterator< remove_whitespace_predicate< - BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type - //BOOST_DEDUCED_TYPENAME Base::value_type + typename boost::iterator_value<Base>::type + //typename Base::value_type >, Base diff --git a/3rdParty/Boost/src/boost/archive/iterators/transform_width.hpp b/3rdParty/Boost/src/boost/archive/iterators/transform_width.hpp index 6e2c526..4e11953 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/transform_width.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/transform_width.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -25,7 +25,4 @@ // or 3 8 bit characters -#include <algorithm> - -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME & PTFO #include <boost/serialization/pfto.hpp> @@ -33,4 +30,6 @@ #include <boost/iterator/iterator_traits.hpp> +#include <algorithm> // std::min + namespace boost { namespace archive { @@ -44,5 +43,5 @@ template< int BitsOut, int BitsIn, - class CharType = BOOST_DEDUCED_TYPENAME boost::iterator_value<Base>::type // output character + class CharType = typename boost::iterator_value<Base>::type // output character > class transform_width : @@ -56,5 +55,5 @@ class transform_width : { friend class boost::iterator_core_access; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + typedef typename boost::iterator_adaptor< transform_width<Base, BitsOut, BitsIn, CharType>, Base, @@ -65,50 +64,47 @@ class transform_width : typedef transform_width<Base, BitsOut, BitsIn, CharType> this_t; - typedef BOOST_DEDUCED_TYPENAME iterator_value<Base>::type base_value_type; + typedef typename iterator_value<Base>::type base_value_type; - CharType fill(); + void fill(); - CharType dereference_impl(){ - if(! m_full){ - m_current_value = fill(); - m_full = true; - } - return m_current_value; + CharType dereference() const { + if(!m_buffer_out_full) + const_cast<this_t *>(this)->fill(); + return m_buffer_out; } - CharType dereference() const { - return const_cast<this_t *>(this)->dereference_impl(); + bool equal_impl(const this_t & rhs){ + if(BitsIn < BitsOut) // discard any left over bits + return this->base_reference() == rhs.base_reference(); + else{ + // BitsIn > BitsOut // zero fill + if(this->base_reference() == rhs.base_reference()){ + m_end_of_sequence = true; + return 0 == m_remaining_bits; + } + return false; + } } - // test for iterator equality + // standard iterator interface bool equal(const this_t & rhs) const { - return - this->base_reference() == rhs.base_reference(); - ; + return const_cast<this_t *>(this)->equal_impl(rhs); } void increment(){ - m_displacement += BitsOut; - - while(m_displacement >= BitsIn){ - m_displacement -= BitsIn; - if(0 == m_displacement) - m_bufferfull = false; - if(! m_bufferfull){ - // note: suspect that this is not invoked for borland - ++(this->base_reference()); - } - } - m_full = false; + m_buffer_out_full = false; } - CharType m_current_value; - // number of bits left in current input character buffer - unsigned int m_displacement; - base_value_type m_buffer; - // flag to current output character is ready - just used to save time - bool m_full; - // flag to indicate that m_buffer has data - bool m_bufferfull; + bool m_buffer_out_full; + CharType m_buffer_out; + + // last read element from input + base_value_type m_buffer_in; + + // number of bits to left in the input buffer. + unsigned int m_remaining_bits; + + // flag to indicate we've reached end of data. + bool m_end_of_sequence; public: @@ -117,49 +113,60 @@ public: transform_width(BOOST_PFTO_WRAPPER(T) start) : super_t(Base(BOOST_MAKE_PFTO_WRAPPER(static_cast< T >(start)))), - m_displacement(0), - m_full(false), - m_bufferfull(false) + m_buffer_out_full(false), + // 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_remaining_bits(0), + m_end_of_sequence(false) {} // intel 7.1 doesn't like default copy constructor transform_width(const transform_width & rhs) : super_t(rhs.base_reference()), - m_current_value(rhs.m_current_value), - m_displacement(rhs.m_displacement), - m_buffer(rhs.m_buffer), - m_full(rhs.m_full), - m_bufferfull(rhs.m_bufferfull) + m_buffer_out_full(rhs.m_buffer_out_full), + m_buffer_in(rhs.m_buffer_in), + m_remaining_bits(rhs.m_remaining_bits), + m_end_of_sequence(false) {} }; -template<class Base, int BitsOut, int BitsIn, class CharType> -CharType transform_width<Base, BitsOut, BitsIn, CharType>::fill(){ - CharType retval = 0; +template< + class Base, + int BitsOut, + int BitsIn, + class CharType +> +void transform_width<Base, BitsOut, BitsIn, CharType>::fill() { unsigned int missing_bits = BitsOut; - for(;;){ - unsigned int bcount; - if(! m_bufferfull){ - m_buffer = * this->base_reference(); - m_bufferfull = true; - bcount = BitsIn; + m_buffer_out = 0; + do{ + if(0 == m_remaining_bits){ + if(m_end_of_sequence){ + m_buffer_in = 0; + m_remaining_bits = missing_bits; + } + else{ + m_buffer_in = * this->base_reference()++; + m_remaining_bits = BitsIn; + } } - else - bcount = BitsIn - m_displacement; - unsigned int i = (std::min)(bcount, missing_bits); + + // append these bits to the next output + // up to the size of the output + unsigned int i = std::min(missing_bits, m_remaining_bits); // shift interesting bits to least significant position - unsigned int j = m_buffer >> (bcount - i); - // strip off uninteresting bits - // (note presumption of two's complement arithmetic) - j &= ~(-(1 << i)); + base_value_type j = m_buffer_in >> (m_remaining_bits - i); + // and mask off the un interesting higher bits + // note presumption of twos complement notation + j &= (1 << i) - 1; // append then interesting bits to the output value - retval <<= i; - retval |= j; + m_buffer_out <<= i; + m_buffer_out |= j; + + // and update counters missing_bits -= i; - if(0 == missing_bits) - break; - // note: suspect that this is not invoked for borland 5.51 - ++(this->base_reference()); - m_bufferfull = false; - } - return retval; + m_remaining_bits -= i; + }while(0 < missing_bits); + m_buffer_out_full = true; } diff --git a/3rdParty/Boost/src/boost/archive/iterators/unescape.hpp b/3rdParty/Boost/src/boost/archive/iterators/unescape.hpp index 9cbd316..abf6240 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/unescape.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/unescape.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -19,7 +19,5 @@ #include <boost/assert.hpp> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME #include <boost/iterator/iterator_adaptor.hpp> -//#include <boost/iterator/iterator_traits.hpp> #include <boost/pointee.hpp> @@ -36,22 +34,22 @@ class unescape unescape<Derived, Base>, Base, - BOOST_DEDUCED_TYPENAME pointee<Base>::type, + typename pointee<Base>::type, single_pass_traversal_tag, - BOOST_DEDUCED_TYPENAME pointee<Base>::type + typename pointee<Base>::type > { friend class boost::iterator_core_access; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + typedef typename boost::iterator_adaptor< unescape<Derived, Base>, Base, - BOOST_DEDUCED_TYPENAME pointee<Base>::type, + typename pointee<Base>::type, single_pass_traversal_tag, - BOOST_DEDUCED_TYPENAME pointee<Base>::type + typename pointee<Base>::type > super_t; typedef unescape<Derived, Base> this_t; public: - typedef BOOST_DEDUCED_TYPENAME this_t::value_type value_type; - typedef BOOST_DEDUCED_TYPENAME this_t::reference reference; + typedef typename this_t::value_type value_type; + typedef typename this_t::reference reference; private: value_type dereference_impl() { diff --git a/3rdParty/Boost/src/boost/archive/iterators/wchar_from_mb.hpp b/3rdParty/Boost/src/boost/archive/iterators/wchar_from_mb.hpp index 4da8121..ab81f17 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/wchar_from_mb.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/wchar_from_mb.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -22,5 +22,5 @@ #include <cstdlib> // mblen -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME +#include <boost/config.hpp> #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ @@ -54,5 +54,5 @@ class wchar_from_mb { friend class boost::iterator_core_access; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_adaptor< + typedef typename boost::iterator_adaptor< wchar_from_mb<Base>, Base, diff --git a/3rdParty/Boost/src/boost/archive/iterators/xml_escape.hpp b/3rdParty/Boost/src/boost/archive/iterators/xml_escape.hpp index eadb96e..a5d2c51 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/xml_escape.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/xml_escape.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -18,8 +18,5 @@ #include <boost/assert.hpp> - -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME #include <boost/serialization/pfto.hpp> - #include <boost/archive/iterators/escape.hpp> diff --git a/3rdParty/Boost/src/boost/archive/iterators/xml_unescape.hpp b/3rdParty/Boost/src/boost/archive/iterators/xml_unescape.hpp index 3295adb..69438ed 100644 --- a/3rdParty/Boost/src/boost/archive/iterators/xml_unescape.hpp +++ b/3rdParty/Boost/src/boost/archive/iterators/xml_unescape.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -19,6 +19,4 @@ #include <boost/assert.hpp> -#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME - #include <boost/serialization/throw_exception.hpp> #include <boost/serialization/pfto.hpp> @@ -40,5 +38,5 @@ class xml_unescape typedef xml_unescape<Base> this_t; typedef unescape<this_t, Base> super_t; - typedef BOOST_DEDUCED_TYPENAME boost::iterator_reference<this_t> reference_type; + typedef typename boost::iterator_reference<this_t> reference_type; reference_type dereference() const { @@ -50,5 +48,5 @@ public: typedef int value_type; #else - typedef BOOST_DEDUCED_TYPENAME this_t::value_type value_type; + typedef typename this_t::value_type value_type; #endif @@ -84,5 +82,5 @@ void xml_unescape<Base>::drain_residue(const char * literal){ // incorrect and thereby break the composiblity of iterators. template<class Base> -BOOST_DEDUCED_TYPENAME xml_unescape<Base>::value_type +typename xml_unescape<Base>::value_type //int xml_unescape<Base>::drain(){ diff --git a/3rdParty/Boost/src/boost/archive/polymorphic_iarchive.hpp b/3rdParty/Boost/src/boost/archive/polymorphic_iarchive.hpp index 2f76cf2..50488a3 100644 --- a/3rdParty/Boost/src/boost/archive/polymorphic_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/polymorphic_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -40,6 +40,4 @@ namespace std{ namespace boost { -template<class T> -class shared_ptr; namespace serialization { class extended_type_info; @@ -156,16 +154,9 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special -// structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a -// special esteem in the boost library - we included it here by default. -#include <boost/archive/shared_ptr_helper.hpp> - -namespace boost { +namespace boost { namespace archive { class polymorphic_iarchive : - public polymorphic_iarchive_impl, - public detail::shared_ptr_helper + public polymorphic_iarchive_impl { public: diff --git a/3rdParty/Boost/src/boost/archive/polymorphic_oarchive.hpp b/3rdParty/Boost/src/boost/archive/polymorphic_oarchive.hpp index 420029b..1eb9e0b 100644 --- a/3rdParty/Boost/src/boost/archive/polymorphic_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/polymorphic_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -39,6 +39,4 @@ namespace std{ namespace boost { -template<class T> -class shared_ptr; namespace serialization { class extended_type_info; diff --git a/3rdParty/Boost/src/boost/archive/shared_ptr_helper.hpp b/3rdParty/Boost/src/boost/archive/shared_ptr_helper.hpp deleted file mode 100644 index 39e6eb8..0000000 --- a/3rdParty/Boost/src/boost/archive/shared_ptr_helper.hpp +++ /dev/null @@ -1,219 +0,0 @@ -#ifndef BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP -#define BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// shared_ptr_helper.hpp: serialization for boost shared pointern - -// (C) Copyright 2004-2009 Robert Ramey, Martin Ecker and Takatoshi Kondo -// 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 <set> -#include <list> -#include <utility> -#include <cstddef> // NULL - -#include <boost/config.hpp> -#include <boost/shared_ptr.hpp> - -#include <boost/type_traits/is_polymorphic.hpp> -#include <boost/serialization/type_info_implementation.hpp> -#include <boost/serialization/shared_ptr_132.hpp> -#include <boost/serialization/throw_exception.hpp> - -#include <boost/archive/archive_exception.hpp> -#include <boost/archive/detail/decl.hpp> - -#include <boost/archive/detail/abi_prefix.hpp> // must be the last headern - -namespace boost_132 { - template<class T> class shared_ptr; -} -namespace boost { - template<class T> class shared_ptr; - namespace serialization { - class extended_type_info; - template<class Archive, class T> - inline void load( - Archive & ar, - boost::shared_ptr< T > &t, - const unsigned int file_version - ); - } -namespace archive{ -namespace detail { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// a common class for holding various types of shared pointers - -class shared_ptr_helper { - struct collection_type_compare { - bool operator()( - const shared_ptr<const void> &lhs, - const shared_ptr<const void> &rhs - )const{ - return lhs.get() < rhs.get(); - } - }; - typedef std::set< - boost::shared_ptr<const void>, - collection_type_compare - > collection_type; - typedef collection_type::const_iterator iterator_type; - // list of shared_pointers create accessable by raw pointer. This - // is used to "match up" shared pointers loaded at different - // points in the archive. Note, we delay construction until - // it is actually used since this is by default included as - // a "mix-in" even if shared_ptr isn't used. - collection_type * m_pointers; - - struct null_deleter { - void operator()(void const *) const {} - }; - - struct void_deleter { - const boost::serialization::extended_type_info * m_eti; - void_deleter(const boost::serialization::extended_type_info *eti) : - m_eti(eti) - {} - void operator()(void *vp) const { - m_eti->destroy(vp); - } - }; - -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - template<class Archive, class T> - friend inline void boost::serialization::load( - Archive & ar, - boost::shared_ptr< T > &t, - const unsigned int file_version - ); -#endif - -// #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP - // list of loaded pointers. This is used to be sure that the pointers - // stay around long enough to be "matched" with other pointers loaded - // by the same archive. These are created with a "null_deleter" so that - // when this list is destroyed - the underlaying raw pointers are not - // destroyed. This has to be done because the pointers are also held by - // new system which is disjoint from this set. This is implemented - // by a change in load_construct_data below. It makes this file suitable - // only for loading pointers into a 1.33 or later boost system. - std::list<boost_132::shared_ptr<const void> > * m_pointers_132; -// #endif - - // returns pointer to object and an indicator whether this is a - // new entry (true) or a previous one (false) - BOOST_ARCHIVE_DECL(shared_ptr<void>) - get_od( - const void * od, - const boost::serialization::extended_type_info * true_type, - const boost::serialization::extended_type_info * this_type - ); - - BOOST_ARCHIVE_DECL(void) - append(const boost::shared_ptr<const void> &); - - template<class T> - struct non_polymorphic { - static const boost::serialization::extended_type_info * - get_object_identifier(T &){ - return & boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME - boost::serialization::type_info_implementation< T >::type - >::get_const_instance(); - } - }; - template<class T> - struct polymorphic { - static const boost::serialization::extended_type_info * - get_object_identifier(T & t){ - return boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME - boost::serialization::type_info_implementation< T >::type - >::get_const_instance().get_derived_extended_type_info(t); - } - }; -public: - template<class T> - void reset(shared_ptr< T > & s, T * t){ - if(NULL == t){ - s.reset(); - return; - } - const boost::serialization::extended_type_info * this_type - = & boost::serialization::type_info_implementation< T >::type - ::get_const_instance(); - - // get pointer to the most derived object. This is effectively - // the object identifern - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< - is_polymorphic< T >, - mpl::identity<polymorphic< T > >, - mpl::identity<non_polymorphic< T > > - >::type type; - - const boost::serialization::extended_type_info * true_type - = type::get_object_identifier(*t); - - // note:if this exception is thrown, be sure that derived pointern - // is either registered or exported. - if(NULL == true_type) - boost::serialization::throw_exception( - archive_exception( - archive_exception::unregistered_class, - this_type->get_debug_info() - ) - ); - shared_ptr<void> r = - get_od( - static_cast<const void *>(t), - true_type, - this_type - ); - if(!r){ - s.reset(t); - const void * od = void_downcast( - *true_type, - *this_type, - static_cast<const void *>(t) - ); - shared_ptr<const void> sp(s, od); - append(sp); - } - else{ - s = shared_ptr< T >( - r, - static_cast<T *>(r.get()) - ); - } - } - -// #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP - BOOST_ARCHIVE_DECL(void) - append(const boost_132::shared_ptr<const void> & t); -// #endif -public: - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) - shared_ptr_helper(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) - ~shared_ptr_helper(); -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP diff --git a/3rdParty/Boost/src/boost/archive/text_iarchive.hpp b/3rdParty/Boost/src/boost/archive/text_iarchive.hpp index 298928b..1fd0f60 100644 --- a/3rdParty/Boost/src/boost/archive/text_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/text_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -36,4 +36,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + template<class Archive> class text_iarchive_impl : @@ -44,8 +48,14 @@ class text_iarchive_impl : public: #else - friend class detail::interface_iarchive<Archive>; - friend class basic_text_iarchive<Archive>; - friend class load_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + friend load_access; + #else + friend class detail::interface_iarchive<Archive>; + friend class load_access; + #endif #endif template<class T> @@ -93,20 +103,4 @@ protected: }; -// do not derive from the classes below. If you want to extend this functionality -// via inhertance, derived from text_iarchive_impl instead. This will -// preserve correct static polymorphism. - -// same as text_iarchive below - without the shared_ptr_helper -class naked_text_iarchive : - public text_iarchive_impl<naked_text_iarchive> -{ -public: - naked_text_iarchive(std::istream & is_, unsigned int flags = 0) : - // note: added _ to suppress useless gcc warning - text_iarchive_impl<naked_text_iarchive>(is_, flags) - {} - ~naked_text_iarchive(){} -}; - } // namespace archive } // namespace boost @@ -118,10 +112,4 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special -// structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a -// special esteem in the boost library - we included it here by default. -#include <boost/archive/shared_ptr_helper.hpp> - #ifdef BOOST_MSVC # pragma warning(push) @@ -133,7 +121,5 @@ namespace archive { class text_iarchive : - public text_iarchive_impl<text_iarchive>, - public detail::shared_ptr_helper -{ + public text_iarchive_impl<text_iarchive>{ public: text_iarchive(std::istream & is_, unsigned int flags = 0) : diff --git a/3rdParty/Boost/src/boost/archive/text_oarchive.hpp b/3rdParty/Boost/src/boost/archive/text_oarchive.hpp index 2100d53..9fd63a9 100644 --- a/3rdParty/Boost/src/boost/archive/text_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/text_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -43,4 +43,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + template<class Archive> class text_oarchive_impl : @@ -51,8 +55,16 @@ class text_oarchive_impl : public: #else - friend class detail::interface_oarchive<Archive>; - friend class basic_text_oarchive<Archive>; - friend class save_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive<Archive>; + friend basic_text_oarchive<Archive>; + friend save_access; + #else + friend class detail::interface_oarchive<Archive>; + friend class basic_text_oarchive<Archive>; + friend class save_access; + #endif #endif template<class T> @@ -103,6 +115,4 @@ public: }; -typedef text_oarchive naked_text_oarchive; - } // namespace archive } // namespace boost diff --git a/3rdParty/Boost/src/boost/archive/text_wiarchive.hpp b/3rdParty/Boost/src/boost/archive/text_wiarchive.hpp index 7451f3a..5105d35 100644 --- a/3rdParty/Boost/src/boost/archive/text_wiarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/text_wiarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -40,4 +40,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + template<class Archive> class text_wiarchive_impl : @@ -48,8 +52,14 @@ class text_wiarchive_impl : public: #else - friend class detail::interface_iarchive<Archive>; - friend class basic_text_iarchive<Archive>; - friend class load_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + friend load_access; + #else + friend class detail::interface_iarchive<Archive>; + friend class load_access; + #endif #endif template<class T> @@ -90,19 +100,4 @@ protected: }; -// do not derive from the classes below. If you want to extend this functionality -// via inhertance, derived from text_iarchive_impl instead. This will -// preserve correct static polymorphism. - -// same as text_wiarchive below - without the shared_ptr_helper -class naked_text_wiarchive : - public text_wiarchive_impl<naked_text_wiarchive> -{ -public: - naked_text_wiarchive(std::wistream & is, unsigned int flags = 0) : - text_wiarchive_impl<naked_text_wiarchive>(is, flags) - {} - ~naked_text_wiarchive(){} -}; - } // namespace archive } // namespace boost @@ -114,10 +109,4 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special -// structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a -// special esteem in the boost library - we included it here by default. -#include <boost/archive/shared_ptr_helper.hpp> - #ifdef BOOST_MSVC # pragma warning(push) @@ -129,7 +118,5 @@ namespace archive { class text_wiarchive : - public text_wiarchive_impl<text_wiarchive>, - public detail::shared_ptr_helper -{ + public text_wiarchive_impl<text_wiarchive>{ public: text_wiarchive(std::wistream & is, unsigned int flags = 0) : diff --git a/3rdParty/Boost/src/boost/archive/text_woarchive.hpp b/3rdParty/Boost/src/boost/archive/text_woarchive.hpp index 7ed0c82..2f75204 100644 --- a/3rdParty/Boost/src/boost/archive/text_woarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/text_woarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -48,4 +48,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + template<class Archive> class text_woarchive_impl : @@ -56,8 +60,16 @@ class text_woarchive_impl : public: #else - friend class detail::interface_oarchive<Archive>; - friend class basic_text_oarchive<Archive>; - friend class save_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive<Archive>; + friend basic_text_oarchive<Archive>; + friend save_access; + #else + friend class detail::interface_oarchive<Archive>; + friend class basic_text_oarchive<Archive>; + friend class save_access; + #endif #endif template<class T> @@ -128,6 +140,4 @@ public: }; -typedef text_woarchive naked_text_woarchive; - } // namespace archive } // namespace boost diff --git a/3rdParty/Boost/src/boost/archive/wcslen.hpp b/3rdParty/Boost/src/boost/archive/wcslen.hpp index 5c14acf..2a3d635 100644 --- a/3rdParty/Boost/src/boost/archive/wcslen.hpp +++ b/3rdParty/Boost/src/boost/archive/wcslen.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/xml_archive_exception.hpp b/3rdParty/Boost/src/boost/archive/xml_archive_exception.hpp index 48e6cb3..622cafe 100644 --- a/3rdParty/Boost/src/boost/archive/xml_archive_exception.hpp +++ b/3rdParty/Boost/src/boost/archive/xml_archive_exception.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif diff --git a/3rdParty/Boost/src/boost/archive/xml_iarchive.hpp b/3rdParty/Boost/src/boost/archive/xml_iarchive.hpp index be6cfe4..ba50d7c 100644 --- a/3rdParty/Boost/src/boost/archive/xml_iarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/xml_iarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -36,4 +36,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + template<class CharType> class basic_xml_grammar; @@ -48,8 +52,16 @@ class xml_iarchive_impl : public: #else - friend class detail::interface_iarchive<Archive>; - friend class basic_xml_iarchive<Archive>; - friend class load_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + friend basic_xml_iarchive<Archive>; + friend load_access; + #else + friend class detail::interface_iarchive<Archive>; + friend class basic_xml_iarchive<Archive>; + friend class load_access; + #endif #endif // instances of micro xml parser to parse start preambles @@ -103,19 +115,4 @@ protected: }; -// do not derive from the classes below. If you want to extend this functionality -// via inhertance, derived from text_iarchive_impl instead. This will -// preserve correct static polymorphism. - -// same as xml_iarchive below - without the shared_ptr_helper -class naked_xml_iarchive : - public xml_iarchive_impl<naked_xml_iarchive> -{ -public: - naked_xml_iarchive(std::istream & is, unsigned int flags = 0) : - xml_iarchive_impl<naked_xml_iarchive>(is, flags) - {} - ~naked_xml_iarchive(){} -}; - } // namespace archive } // namespace boost @@ -126,11 +123,4 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas - -// note special treatment of shared_ptr. This type needs a special -// structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a -// special esteem in the boost library - we included it here by default. -#include <boost/archive/shared_ptr_helper.hpp> - #ifdef BOOST_MSVC # pragma warning(push) @@ -142,7 +132,5 @@ namespace archive { class xml_iarchive : - public xml_iarchive_impl<xml_iarchive>, - public detail::shared_ptr_helper -{ + public xml_iarchive_impl<xml_iarchive>{ public: xml_iarchive(std::istream & is, unsigned int flags = 0) : diff --git a/3rdParty/Boost/src/boost/archive/xml_oarchive.hpp b/3rdParty/Boost/src/boost/archive/xml_oarchive.hpp index 167ba09..2ac4ae1 100644 --- a/3rdParty/Boost/src/boost/archive/xml_oarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/xml_oarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -43,4 +43,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + template<class Archive> class xml_oarchive_impl : @@ -51,8 +55,16 @@ class xml_oarchive_impl : public: #else - friend class detail::interface_oarchive<Archive>; - friend class basic_xml_oarchive<Archive>; - friend class save_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive<Archive>; + friend basic_xml_oarchive<Archive>; + friend save_access; + #else + friend class detail::interface_oarchive<Archive>; + friend class basic_xml_oarchive<Archive>; + friend class save_access; + #endif #endif //void end_preamble(){ @@ -117,6 +129,4 @@ public: }; -typedef xml_oarchive naked_xml_oarchive; - } // namespace archive } // namespace boost diff --git a/3rdParty/Boost/src/boost/archive/xml_wiarchive.hpp b/3rdParty/Boost/src/boost/archive/xml_wiarchive.hpp index 59ebbb5..31aff88 100644 --- a/3rdParty/Boost/src/boost/archive/xml_wiarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/xml_wiarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -41,4 +41,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_iarchive; +} // namespace detail + template<class CharType> class basic_xml_grammar; @@ -53,8 +57,16 @@ class xml_wiarchive_impl : public: #else - friend class detail::interface_iarchive<Archive>; - friend class basic_xml_iarchive<Archive>; - friend class load_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_iarchive<Archive>; + friend basic_xml_iarchive<Archive>; + friend load_access; + #else + friend class detail::interface_iarchive<Archive>; + friend class basic_xml_iarchive<Archive>; + friend class load_access; + #endif #endif // instances of micro xml parser to parse start preambles @@ -108,19 +120,4 @@ protected: }; -// do not derive from the classes below. If you want to extend this functionality -// via inhertance, derived from xml_wiarchive_impl instead. This will -// preserve correct static polymorphism. - -// same as xml_wiarchive below - without the shared_ptr_helper -class naked_xml_wiarchive : - public xml_wiarchive_impl<naked_xml_wiarchive> -{ -public: - naked_xml_wiarchive(std::wistream & is, unsigned int flags = 0) : - xml_wiarchive_impl<naked_xml_wiarchive>(is, flags) - {} - ~naked_xml_wiarchive(){} -}; - } // namespace archive } // namespace boost @@ -132,10 +129,4 @@ public: #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas -// note special treatment of shared_ptr. This type needs a special -// structure associated with every archive. We created a "mix-in" -// class to provide this functionality. Since shared_ptr holds a -// special esteem in the boost library - we included it here by default. -#include <boost/archive/shared_ptr_helper.hpp> - #ifdef BOOST_MSVC # pragma warning(push) @@ -147,7 +138,5 @@ namespace archive { class xml_wiarchive : - public xml_wiarchive_impl<xml_wiarchive>, - public detail::shared_ptr_helper -{ + public xml_wiarchive_impl<xml_wiarchive>{ public: xml_wiarchive(std::wistream & is, unsigned int flags = 0) : diff --git a/3rdParty/Boost/src/boost/archive/xml_woarchive.hpp b/3rdParty/Boost/src/boost/archive/xml_woarchive.hpp index 08c0fdc..7fcaeb9 100644 --- a/3rdParty/Boost/src/boost/archive/xml_woarchive.hpp +++ b/3rdParty/Boost/src/boost/archive/xml_woarchive.hpp @@ -3,5 +3,5 @@ // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -47,4 +47,8 @@ namespace boost { namespace archive { +namespace detail { + template<class Archive> class interface_oarchive; +} // namespace detail + template<class Archive> class xml_woarchive_impl : @@ -55,9 +59,18 @@ class xml_woarchive_impl : public: #else - friend class detail::interface_oarchive<Archive>; - friend class basic_xml_oarchive<Archive>; - friend class save_access; protected: + #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) + // for some inexplicable reason insertion of "class" generates compile erro + // on msvc 7.1 + friend detail::interface_oarchive<Archive>; + friend basic_xml_oarchive<Archive>; + friend save_access; + #else + friend class detail::interface_oarchive<Archive>; + friend class basic_xml_oarchive<Archive>; + friend class save_access; + #endif #endif + //void end_preamble(){ // basic_xml_oarchive<Archive>::end_preamble(); @@ -123,6 +136,4 @@ public: }; -typedef xml_woarchive naked_xml_woarchive; - } // namespace archive } // namespace boost |
Swift