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/serialization | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/serialization')
49 files changed, 495 insertions, 1648 deletions
diff --git a/3rdParty/Boost/src/boost/serialization/access.hpp b/3rdParty/Boost/src/boost/serialization/access.hpp index 40256d6..ec88ff5 100644 --- a/3rdParty/Boost/src/boost/serialization/access.hpp +++ b/3rdParty/Boost/src/boost/serialization/access.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_ACCESS_HPP // 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/serialization/array.hpp b/3rdParty/Boost/src/boost/serialization/array.hpp index 3391a96..35c640c 100644 --- a/3rdParty/Boost/src/boost/serialization/array.hpp +++ b/3rdParty/Boost/src/boost/serialization/array.hpp @@ -6,10 +6,14 @@ // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) +#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression + #include <iostream> #include <cstddef> // std::size_t -#include <cstddef> -#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include <array> +#endif + #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::size_t; @@ -97,9 +101,9 @@ public: template<class Archive> void serialize(Archive &ar, const unsigned int version) { - typedef BOOST_DEDUCED_TYPENAME + typedef typename boost::serialization::use_array_optimization<Archive>::template apply< - BOOST_DEDUCED_TYPENAME remove_const< T >::type + typename remove_const< T >::type >::type use_optimized; serialize_optimized(ar,version,use_optimized()); } @@ -128,12 +132,26 @@ array< T > make_array( T* t, std::size_t s){ return array< T >(t, s); } +// implement serialization for boost::array template <class Archive, class T, std::size_t N> void serialize(Archive& ar, boost::array<T,N>& a, const unsigned int /* version */) { - ar & boost::serialization::make_nvp("elems",a.elems); + ar & boost::serialization::make_nvp("elems", a.elems); } +#ifndef BOOST_NO_CXX11_HDR_ARRAY +// implement serialization for std::array +template <class Archive, class T, std::size_t N> +void serialize(Archive& ar, std::array<T,N>& a, const unsigned int /* version */) +{ + ar & boost::serialization::make_nvp( + "elems", + *static_cast<T (*)[N]>(static_cast<void *>(a.data())) + ); + +} +#endif + } } // end namespace boost::serialization #ifdef __BORLANDC__ @@ -145,7 +163,7 @@ namespace boost { namespace serialization { \ template <> struct use_array_optimization<Archive> { \ template <class ValueType> \ struct apply : boost::mpl::apply1<Archive::use_array_optimization \ - , BOOST_DEDUCED_TYPENAME boost::remove_const<ValueType>::type \ + , typename boost::remove_const<ValueType>::type \ >::type {}; \ }; }} #endif // __BORLANDC__ diff --git a/3rdParty/Boost/src/boost/serialization/assume_abstract.hpp b/3rdParty/Boost/src/boost/serialization/assume_abstract.hpp index 4a8123a..a5cb2f5 100644 --- a/3rdParty/Boost/src/boost/serialization/assume_abstract.hpp +++ b/3rdParty/Boost/src/boost/serialization/assume_abstract.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_ASSUME_ABSTRACT_HPP // 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/serialization/base_object.hpp b/3rdParty/Boost/src/boost/serialization/base_object.hpp index b840d25..562dbd5 100644 --- a/3rdParty/Boost/src/boost/serialization/base_object.hpp +++ b/3rdParty/Boost/src/boost/serialization/base_object.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_BASE_OBJECT_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -48,7 +48,7 @@ namespace detail template<class B, class D> struct base_cast { - typedef BOOST_DEDUCED_TYPENAME + typedef typename mpl::if_< is_const<D>, const B, @@ -74,7 +74,7 @@ namespace detail } }; static void const * invoke(){ - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< is_polymorphic<Base>, mpl::identity<polymorphic>, mpl::identity<non_polymorphic> @@ -95,12 +95,12 @@ base_object(const Derived & d) } #else template<class Base, class Derived> -BOOST_DEDUCED_TYPENAME detail::base_cast<Base, Derived>::type & +typename detail::base_cast<Base, Derived>::type & base_object(Derived &d) { BOOST_STATIC_ASSERT(( is_base_and_derived<Base,Derived>::value)); BOOST_STATIC_ASSERT(! is_pointer<Derived>::value); - typedef BOOST_DEDUCED_TYPENAME detail::base_cast<Base, Derived>::type type; + typedef typename detail::base_cast<Base, Derived>::type type; detail::base_register<type, Derived>::invoke(); return access::cast_reference<type, Derived>(d); } diff --git a/3rdParty/Boost/src/boost/serialization/collection_traits.hpp b/3rdParty/Boost/src/boost/serialization/collection_traits.hpp index 60453c7..b3fe843 100644 --- a/3rdParty/Boost/src/boost/serialization/collection_traits.hpp +++ b/3rdParty/Boost/src/boost/serialization/collection_traits.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_COLLECTION_TRAITS_HPP // 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/serialization/collections_load_imp.hpp b/3rdParty/Boost/src/boost/serialization/collections_load_imp.hpp index 11b00cd..2291e74 100644 --- a/3rdParty/Boost/src/boost/serialization/collections_load_imp.hpp +++ b/3rdParty/Boost/src/boost/serialization/collections_load_imp.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_COLLECTIONS_LOAD_IMP_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -51,14 +51,14 @@ namespace stl { template<class Archive, class Container> struct archive_input_seq { - inline BOOST_DEDUCED_TYPENAME Container::iterator + inline typename Container::iterator operator()( Archive &ar, Container &s, const unsigned int v, - BOOST_DEDUCED_TYPENAME Container::iterator hint + typename Container::iterator hint ){ - typedef BOOST_DEDUCED_TYPENAME Container::value_type type; + typedef typename Container::value_type type; detail::stack_construct<Archive, type> t(ar, v); // borland fails silently w/o full namespace ar >> boost::serialization::make_nvp("item", t.reference()); @@ -72,18 +72,18 @@ struct archive_input_seq template<class Archive, class Container> struct archive_input_map { - inline BOOST_DEDUCED_TYPENAME Container::iterator + inline typename Container::iterator operator()( Archive &ar, Container &s, const unsigned int v, - BOOST_DEDUCED_TYPENAME Container::iterator hint + typename Container::iterator hint ){ - typedef BOOST_DEDUCED_TYPENAME Container::value_type type; + typedef typename Container::value_type type; detail::stack_construct<Archive, type> t(ar, v); // borland fails silently w/o full namespace ar >> boost::serialization::make_nvp("item", t.reference()); - BOOST_DEDUCED_TYPENAME Container::iterator result = + typename Container::iterator result = s.insert(hint, t.reference()); // note: the following presumes that the map::value_type was NOT tracked // in the archive. This is the usual case, but here there is no way @@ -100,18 +100,18 @@ struct archive_input_map template<class Archive, class Container> struct archive_input_set { - inline BOOST_DEDUCED_TYPENAME Container::iterator + inline typename Container::iterator operator()( Archive &ar, Container &s, const unsigned int v, - BOOST_DEDUCED_TYPENAME Container::iterator hint + typename Container::iterator hint ){ - typedef BOOST_DEDUCED_TYPENAME Container::value_type type; + typedef typename Container::value_type type; detail::stack_construct<Archive, type> t(ar, v); // borland fails silently w/o full namespace ar >> boost::serialization::make_nvp("item", t.reference()); - BOOST_DEDUCED_TYPENAME Container::iterator result = + typename Container::iterator result = s.insert(hint, t.reference()); ar.reset_object_address(& (* result), & t.reference()); return result; @@ -138,12 +138,12 @@ template<class Archive, class Container, class InputFunction, class R> inline void load_collection(Archive & ar, Container &s) { s.clear(); - collection_size_type count; const boost::archive::library_version_type library_version( ar.get_library_version() ); // retrieve number of elements item_version_type item_version(0); + collection_size_type count; ar >> BOOST_SERIALIZATION_NVP(count); if(boost::archive::library_version_type(3) < library_version){ ar >> BOOST_SERIALIZATION_NVP(item_version); @@ -152,7 +152,7 @@ inline void load_collection(Archive & ar, Container &s) R rx; rx(s, count); InputFunction ifunc; - BOOST_DEDUCED_TYPENAME Container::iterator hint; + typename Container::iterator hint; hint = s.begin(); while(count-- > 0){ hint = ifunc(ar, s, item_version, hint); diff --git a/3rdParty/Boost/src/boost/serialization/collections_save_imp.hpp b/3rdParty/Boost/src/boost/serialization/collections_save_imp.hpp index 5151c4b..f3cabfc 100644 --- a/3rdParty/Boost/src/boost/serialization/collections_save_imp.hpp +++ b/3rdParty/Boost/src/boost/serialization/collections_save_imp.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_COLLECTIONS_SAVE_IMP_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -34,14 +34,16 @@ namespace stl { // template<class Archive, class Container> -inline void save_collection(Archive & ar, const Container &s) +inline void save_collection( + Archive & ar, + const Container &s, + collection_size_type count) { + ar << BOOST_SERIALIZATION_NVP(count); // record number of elements - collection_size_type count(s.size()); const item_version_type item_version( - version<BOOST_DEDUCED_TYPENAME Container::value_type>::value + version<typename Container::value_type>::value ); - ar << BOOST_SERIALIZATION_NVP(count); #if 0 boost::archive::library_version_type library_version( ar.get_library_version() @@ -53,7 +55,7 @@ inline void save_collection(Archive & ar, const Container &s) ar << BOOST_SERIALIZATION_NVP(item_version); #endif - BOOST_DEDUCED_TYPENAME Container::const_iterator it = s.begin(); + typename Container::const_iterator it = s.begin(); while(count-- > 0){ // note borland emits a no-op without the explicit namespace boost::serialization::save_construct_data_adl( @@ -65,6 +67,14 @@ inline void save_collection(Archive & ar, const Container &s) } } +template<class Archive, class Container> +inline void save_collection(Archive & ar, const Container &s) +{ + // record number of elements + collection_size_type count(s.size()); + save_collection(ar, s, count); +} + } // namespace stl } // namespace serialization } // namespace boost diff --git a/3rdParty/Boost/src/boost/serialization/detail/get_data.hpp b/3rdParty/Boost/src/boost/serialization/detail/get_data.hpp index 3cbcb4a..da89213 100644 --- a/3rdParty/Boost/src/boost/serialization/detail/get_data.hpp +++ b/3rdParty/Boost/src/boost/serialization/detail/get_data.hpp @@ -9,7 +9,7 @@ #define BOOST_SERIALIZATION_DETAIL_GET_DATA_HPP // 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/serialization/detail/shared_count_132.hpp b/3rdParty/Boost/src/boost/serialization/detail/shared_count_132.hpp deleted file mode 100644 index c42355b..0000000 --- a/3rdParty/Boost/src/boost/serialization/detail/shared_count_132.hpp +++ /dev/null @@ -1,569 +0,0 @@ -#ifndef BOOST_DETAIL_SHARED_COUNT_132_HPP_INCLUDED -#define BOOST_DETAIL_SHARED_COUNT_132_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// detail/shared_count.hpp -// -// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#include <boost/config.hpp> - -#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR) -# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible. -#endif - -#include <boost/checked_delete.hpp> -#include <boost/serialization/throw_exception.hpp> -#include <boost/detail/lightweight_mutex.hpp> - -#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) -#include <boost/detail/quick_allocator.hpp> -#endif - -#include <memory> // std::auto_ptr, std::allocator -#include <functional> // std::less -#include <exception> // std::exception -#include <new> // std::bad_alloc -#include <typeinfo> // std::type_info in get_deleter -#include <cstddef> // std::size_t - -#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#ifdef __BORLANDC__ -# pragma warn -8026 // Functions with excep. spec. are not expanded inline -# pragma warn -8027 // Functions containing try are not expanded inline -#endif - -namespace boost_132 { - -// Debug hooks - -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - -void sp_scalar_constructor_hook(void * px, std::size_t size, void * pn); -void sp_array_constructor_hook(void * px); -void sp_scalar_destructor_hook(void * px, std::size_t size, void * pn); -void sp_array_destructor_hook(void * px); - -#endif - - -// The standard library that comes with Borland C++ 5.5.1 -// defines std::exception and its members as having C calling -// convention (-pc). When the definition of bad_weak_ptr -// is compiled with -ps, the compiler issues an error. -// Hence, the temporary #pragma option -pc below. The version -// check is deliberately conservative. - -#if defined(__BORLANDC__) && __BORLANDC__ == 0x551 -# pragma option push -pc -#endif - -class bad_weak_ptr: public std::exception -{ -public: - - virtual char const * what() const throw() - { - return "boost::bad_weak_ptr"; - } -}; - -#if defined(__BORLANDC__) && __BORLANDC__ == 0x551 -# pragma option pop -#endif - -namespace detail{ - -class sp_counted_base -{ -//private: - - typedef boost::detail::lightweight_mutex mutex_type; - -public: - - sp_counted_base(): use_count_(1), weak_count_(1) - { - } - - virtual ~sp_counted_base() // nothrow - { - } - - // dispose() is called when use_count_ drops to zero, to release - // the resources managed by *this. - - virtual void dispose() = 0; // nothrow - - // destruct() is called when weak_count_ drops to zero. - - virtual void destruct() // nothrow - { - delete this; - } - - virtual void * get_deleter(std::type_info const & ti) = 0; - - void add_ref_copy() - { -#if defined(BOOST_HAS_THREADS) - mutex_type::scoped_lock lock(mtx_); -#endif - ++use_count_; - } - - void add_ref_lock() - { -#if defined(BOOST_HAS_THREADS) - mutex_type::scoped_lock lock(mtx_); -#endif - if(use_count_ == 0) boost::serialization::throw_exception(bad_weak_ptr()); - ++use_count_; - } - - void release() // nothrow - { - { -#if defined(BOOST_HAS_THREADS) - mutex_type::scoped_lock lock(mtx_); -#endif - long new_use_count = --use_count_; - - if(new_use_count != 0) return; - } - - dispose(); - weak_release(); - } - - void weak_add_ref() // nothrow - { -#if defined(BOOST_HAS_THREADS) - mutex_type::scoped_lock lock(mtx_); -#endif - ++weak_count_; - } - - void weak_release() // nothrow - { - long new_weak_count; - - { -#if defined(BOOST_HAS_THREADS) - mutex_type::scoped_lock lock(mtx_); -#endif - new_weak_count = --weak_count_; - } - - if(new_weak_count == 0) - { - destruct(); - } - } - - long use_count() const // nothrow - { -#if defined(BOOST_HAS_THREADS) - mutex_type::scoped_lock lock(mtx_); -#endif - return use_count_; - } - -//private: -public: - sp_counted_base(sp_counted_base const &); - sp_counted_base & operator= (sp_counted_base const &); - - long use_count_; // #shared - long weak_count_; // #weak + (#shared != 0) - -#if defined(BOOST_HAS_THREADS) || defined(BOOST_LWM_WIN32) - mutable mutex_type mtx_; -#endif -}; - -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - -template<class T> void cbi_call_constructor_hook(sp_counted_base * pn, T * px, checked_deleter< T > const &, int) -{ - boost::sp_scalar_constructor_hook(px, sizeof(T), pn); -} - -template<class T> void cbi_call_constructor_hook(sp_counted_base *, T * px, checked_array_deleter< T > const &, int) -{ - boost::sp_array_constructor_hook(px); -} - -template<class P, class D> void cbi_call_constructor_hook(sp_counted_base *, P const &, D const &, long) -{ -} - -template<class T> void cbi_call_destructor_hook(sp_counted_base * pn, T * px, checked_deleter< T > const &, int) -{ - boost::sp_scalar_destructor_hook(px, sizeof(T), pn); -} - -template<class T> void cbi_call_destructor_hook(sp_counted_base *, T * px, checked_array_deleter< T > const &, int) -{ - boost::sp_array_destructor_hook(px); -} - -template<class P, class D> void cbi_call_destructor_hook(sp_counted_base *, P const &, D const &, long) -{ -} - -#endif - -// -// Borland's Codeguard trips up over the -Vx- option here: -// -#ifdef __CODEGUARD__ -# pragma option push -Vx- -#endif - -template<class P, class D> class sp_counted_base_impl: public sp_counted_base -{ -//private: -public: - P ptr; // copy constructor must not throw - D del; // copy constructor must not throw - - sp_counted_base_impl(sp_counted_base_impl const &); - sp_counted_base_impl & operator= (sp_counted_base_impl const &); - - typedef sp_counted_base_impl<P, D> this_type; - -public: - - // pre: initial_use_count <= initial_weak_count, d(p) must not throw - - sp_counted_base_impl(P p, D d): ptr(p), del(d) - { -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - detail::cbi_call_constructor_hook(this, p, d, 0); -#endif - } - - virtual void dispose() // nothrow - { -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - detail::cbi_call_destructor_hook(this, ptr, del, 0); -#endif - del(ptr); - } - - virtual void * get_deleter(std::type_info const & ti) - { - return ti == typeid(D)? &del: 0; - } - -#if defined(BOOST_SP_USE_STD_ALLOCATOR) - - void * operator new(std::size_t) - { - return std::allocator<this_type>().allocate(1, static_cast<this_type *>(0)); - } - - void operator delete(void * p) - { - std::allocator<this_type>().deallocate(static_cast<this_type *>(p), 1); - } - -#endif - -#if defined(BOOST_SP_USE_QUICK_ALLOCATOR) - - void * operator new(std::size_t) - { - return boost::detail::quick_allocator<this_type>::alloc(); - } - - void operator delete(void * p) - { - boost::detail::quick_allocator<this_type>::dealloc(p); - } - -#endif -}; - -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - -int const shared_count_id = 0x2C35F101; -int const weak_count_id = 0x298C38A4; - -#endif - -class weak_count; - -class shared_count -{ -//private: -public: - sp_counted_base * pi_; - -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - int id_; -#endif - - friend class weak_count; - -public: - - shared_count(): pi_(0) // nothrow -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(shared_count_id) -#endif - { - } - - template<class P, class D> shared_count(P p, D d): pi_(0) -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(shared_count_id) -#endif - { -#ifndef BOOST_NO_EXCEPTIONS - - try - { - pi_ = new sp_counted_base_impl<P, D>(p, d); - } - catch(...) - { - d(p); // delete p - throw; - } - -#else - - pi_ = new sp_counted_base_impl<P, D>(p, d); - - if(pi_ == 0) - { - d(p); // delete p - boost::serialization::throw_exception(std::bad_alloc()); - } - -#endif - } - -#ifndef BOOST_NO_AUTO_PTR - - // auto_ptr<Y> is special cased to provide the strong guarantee - - template<class Y> - explicit shared_count(std::auto_ptr<Y> & r): pi_( - new sp_counted_base_impl< - Y *, - boost::checked_deleter<Y> - >(r.get(), boost::checked_deleter<Y>())) -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(shared_count_id) -#endif - { - r.release(); - } - -#endif - - ~shared_count() // nothrow - { - if(pi_ != 0) pi_->release(); -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - id_ = 0; -#endif - } - - shared_count(shared_count const & r): pi_(r.pi_) // nothrow -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(shared_count_id) -#endif - { - if(pi_ != 0) pi_->add_ref_copy(); - } - - explicit shared_count(weak_count const & r); // throws bad_weak_ptr when r.use_count() == 0 - - shared_count & operator= (shared_count const & r) // nothrow - { - sp_counted_base * tmp = r.pi_; - - if(tmp != pi_) - { - if(tmp != 0) tmp->add_ref_copy(); - if(pi_ != 0) pi_->release(); - pi_ = tmp; - } - - return *this; - } - - void swap(shared_count & r) // nothrow - { - sp_counted_base * tmp = r.pi_; - r.pi_ = pi_; - pi_ = tmp; - } - - long use_count() const // nothrow - { - return pi_ != 0? pi_->use_count(): 0; - } - - bool unique() const // nothrow - { - return use_count() == 1; - } - - friend inline bool operator==(shared_count const & a, shared_count const & b) - { - return a.pi_ == b.pi_; - } - - friend inline bool operator<(shared_count const & a, shared_count const & b) - { - return std::less<sp_counted_base *>()(a.pi_, b.pi_); - } - - void * get_deleter(std::type_info const & ti) const - { - return pi_? pi_->get_deleter(ti): 0; - } -}; - -#ifdef __CODEGUARD__ -# pragma option pop -#endif - - -class weak_count -{ -private: - - sp_counted_base * pi_; - -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - int id_; -#endif - - friend class shared_count; - -public: - - weak_count(): pi_(0) // nothrow -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(weak_count_id) -#endif - { - } - - weak_count(shared_count const & r): pi_(r.pi_) // nothrow -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(shared_count_id) -#endif - { - if(pi_ != 0) pi_->weak_add_ref(); - } - - weak_count(weak_count const & r): pi_(r.pi_) // nothrow -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(shared_count_id) -#endif - { - if(pi_ != 0) pi_->weak_add_ref(); - } - - ~weak_count() // nothrow - { - if(pi_ != 0) pi_->weak_release(); -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - id_ = 0; -#endif - } - - weak_count & operator= (shared_count const & r) // nothrow - { - sp_counted_base * tmp = r.pi_; - if(tmp != 0) tmp->weak_add_ref(); - if(pi_ != 0) pi_->weak_release(); - pi_ = tmp; - - return *this; - } - - weak_count & operator= (weak_count const & r) // nothrow - { - sp_counted_base * tmp = r.pi_; - if(tmp != 0) tmp->weak_add_ref(); - if(pi_ != 0) pi_->weak_release(); - pi_ = tmp; - - return *this; - } - - void swap(weak_count & r) // nothrow - { - sp_counted_base * tmp = r.pi_; - r.pi_ = pi_; - pi_ = tmp; - } - - long use_count() const // nothrow - { - return pi_ != 0? pi_->use_count(): 0; - } - - friend inline bool operator==(weak_count const & a, weak_count const & b) - { - return a.pi_ == b.pi_; - } - - friend inline bool operator<(weak_count const & a, weak_count const & b) - { - return std::less<sp_counted_base *>()(a.pi_, b.pi_); - } -}; - -inline shared_count::shared_count(weak_count const & r): pi_(r.pi_) -#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) - , id_(shared_count_id) -#endif -{ - if(pi_ != 0) - { - pi_->add_ref_lock(); - } - else - { - boost::serialization::throw_exception(bad_weak_ptr()); - } -} - -} // namespace detail - -} // namespace boost - -BOOST_SERIALIZATION_ASSUME_ABSTRACT(boost_132::detail::sp_counted_base) - -#ifdef __BORLANDC__ -# pragma warn .8027 // Functions containing try are not expanded inline -# pragma warn .8026 // Functions with excep. spec. are not expanded inline -#endif - -#endif // #ifndef BOOST_DETAIL_SHARED_COUNT_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/serialization/detail/shared_ptr_132.hpp b/3rdParty/Boost/src/boost/serialization/detail/shared_ptr_132.hpp deleted file mode 100644 index b5f2b21..0000000 --- a/3rdParty/Boost/src/boost/serialization/detail/shared_ptr_132.hpp +++ /dev/null @@ -1,478 +0,0 @@ -#ifndef BOOST_SHARED_PTR_132_HPP_INCLUDED -#define BOOST_SHARED_PTR_132_HPP_INCLUDED - -// -// shared_ptr.hpp -// -// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. -// Copyright (c) 2001, 2002, 2003 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. -// - -#include <boost/config.hpp> // for broken compiler workarounds - -#if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) -#include <boost/serialization/detail/shared_ptr_nmt_132.hpp> -#else - -#include <boost/assert.hpp> -#include <boost/checked_delete.hpp> -#include <boost/serialization/throw_exception.hpp> -#include <boost/detail/workaround.hpp> - -#include <boost/serialization/access.hpp> -#include <boost/serialization/detail/shared_count_132.hpp> - -#include <memory> // for std::auto_ptr -#include <algorithm> // for std::swap -#include <functional> // for std::less -#include <typeinfo> // for std::bad_cast -#include <iosfwd> // for std::basic_ostream - -#ifdef BOOST_MSVC // moved here to work around VC++ compiler crash -# pragma warning(push) -# pragma warning(disable:4284) // odd return type for operator-> -#endif - -namespace boost_132 { - -template<class T> class weak_ptr; -template<class T> class enable_shared_from_this; - -namespace detail -{ - -struct static_cast_tag {}; -struct const_cast_tag {}; -struct dynamic_cast_tag {}; -struct polymorphic_cast_tag {}; - -template<class T> struct shared_ptr_traits -{ - typedef T & reference; -}; - -template<> struct shared_ptr_traits<void> -{ - typedef void reference; -}; - -#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) - -template<> struct shared_ptr_traits<void const> -{ - typedef void reference; -}; - -template<> struct shared_ptr_traits<void volatile> -{ - typedef void reference; -}; - -template<> struct shared_ptr_traits<void const volatile> -{ - typedef void reference; -}; - -#endif - -// enable_shared_from_this support - -template<class T, class Y> void sp_enable_shared_from_this( shared_count const & pn, enable_shared_from_this< T > const * pe, Y const * px ) -{ - if(pe != 0) pe->_internal_weak_this._internal_assign(const_cast<Y*>(px), pn); -} - -inline void sp_enable_shared_from_this( shared_count const & /*pn*/, ... ) -{ -} - -} // namespace detail - - -// -// shared_ptr -// -// An enhanced relative of scoped_ptr with reference counted copy semantics. -// The object pointed to is deleted when the last shared_ptr pointing to it -// is destroyed or reset. -// - -template<class T> class shared_ptr -{ -private: - // Borland 5.5.1 specific workaround - typedef shared_ptr< T > this_type; - -public: - - typedef T element_type; - typedef T value_type; - typedef T * pointer; - typedef BOOST_DEDUCED_TYPENAME detail::shared_ptr_traits< T >::reference reference; - - shared_ptr(): px(0), pn() // never throws in 1.30+ - { - } - -#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x564) ) - template<class Y> - explicit shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter<Y>()) // Y must be complete -#else - template<class Y> - explicit shared_ptr(Y * p): px(p), pn(p, boost::checked_deleter<Y>()) // Y must be complete -#endif - { - detail::sp_enable_shared_from_this( pn, p, p ); - } - - // - // Requirements: D's copy constructor must not throw - // - // shared_ptr will release p by calling d(p) - // - - template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d) - { - detail::sp_enable_shared_from_this( pn, p, p ); - } - -// generated copy constructor, assignment, destructor are fine... - -// except that Borland C++ has a bug, and g++ with -Wsynth warns -#if defined(__BORLANDC__) || defined(__GNUC__) - - shared_ptr & operator=(shared_ptr const & r) // never throws - { - px = r.px; - pn = r.pn; // shared_count::op= doesn't throw - return *this; - } - -#endif - - template<class Y> - explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw - { - // it is now safe to copy r.px, as pn(r.pn) did not throw - px = r.px; - } - - template<class Y> - shared_ptr(shared_ptr<Y> const & r): px(r.px), pn(r.pn) // never throws - { - } - - template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn) - { - } - - template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn) - { - } - - template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::dynamic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) - { - if(px == 0) // need to allocate new counter -- the cast failed - { - pn = detail::shared_count(); - } - } - - template<class Y> - shared_ptr(shared_ptr<Y> const & r, detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn) - { - if(px == 0) - { - boost::serialization::throw_exception(std::bad_cast()); - } - } - -#ifndef BOOST_NO_AUTO_PTR - - template<class Y> - explicit shared_ptr(std::auto_ptr<Y> & r): px(r.get()), pn() - { - Y * tmp = r.get(); - pn = detail::shared_count(r); - detail::sp_enable_shared_from_this( pn, tmp, tmp ); - } - -#endif - -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200) - - template<class Y> - shared_ptr & operator=(shared_ptr<Y> const & r) // never throws - { - px = r.px; - pn = r.pn; // shared_count::op= doesn't throw - return *this; - } - -#endif - -#ifndef BOOST_NO_AUTO_PTR - - template<class Y> - shared_ptr & operator=(std::auto_ptr<Y> & r) - { - this_type(r).swap(*this); - return *this; - } - -#endif - - void reset() // never throws in 1.30+ - { - this_type().swap(*this); - } - - template<class Y> void reset(Y * p) // Y must be complete - { - BOOST_ASSERT(p == 0 || p != px); // catch self-reset errors - this_type(p).swap(*this); - } - - template<class Y, class D> void reset(Y * p, D d) - { - this_type(p, d).swap(*this); - } - - reference operator* () const // never throws - { - BOOST_ASSERT(px != 0); - return *px; - } - - T * operator-> () const // never throws - { - BOOST_ASSERT(px != 0); - return px; - } - - T * get() const // never throws - { - return px; - } - - // implicit conversion to "bool" - -#if defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x530) - - operator bool () const - { - return px != 0; - } - -#elif defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) - typedef T * (this_type::*unspecified_bool_type)() const; - - operator unspecified_bool_type() const // never throws - { - return px == 0? 0: &this_type::get; - } - -#else - - typedef T * this_type::*unspecified_bool_type; - - operator unspecified_bool_type() const // never throws - { - return px == 0? 0: &this_type::px; - } - -#endif - - // operator! is redundant, but some compilers need it - - bool operator! () const // never throws - { - return px == 0; - } - - bool unique() const // never throws - { - return pn.unique(); - } - - long use_count() const // never throws - { - return pn.use_count(); - } - - void swap(shared_ptr< T > & other) // never throws - { - std::swap(px, other.px); - pn.swap(other.pn); - } - - template<class Y> bool _internal_less(shared_ptr<Y> const & rhs) const - { - return pn < rhs.pn; - } - - void * _internal_get_deleter(std::type_info const & ti) const - { - return pn.get_deleter(ti); - } - -// Tasteless as this may seem, making all members public allows member templates -// to work in the absence of member template friends. (Matthew Langston) - -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS - -private: - - template<class Y> friend class shared_ptr; - template<class Y> friend class weak_ptr; - - -#endif -public: // for serialization - T * px; // contained pointer - detail::shared_count pn; // reference counter - -}; // shared_ptr - -template<class T, class U> inline bool operator==(shared_ptr< T > const & a, shared_ptr<U> const & b) -{ - return a.get() == b.get(); -} - -template<class T, class U> inline bool operator!=(shared_ptr< T > const & a, shared_ptr<U> const & b) -{ - return a.get() != b.get(); -} - -#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96 - -// Resolve the ambiguity between our op!= and the one in rel_ops - -template<class T> inline bool operator!=(shared_ptr< T > const & a, shared_ptr< T > const & b) -{ - return a.get() != b.get(); -} - -#endif - -template<class T, class U> inline bool operator<(shared_ptr< T > const & a, shared_ptr<U> const & b) -{ - return a._internal_less(b); -} - -template<class T> inline void swap(shared_ptr< T > & a, shared_ptr< T > & b) -{ - a.swap(b); -} - -template<class T, class U> shared_ptr< T > static_pointer_cast(shared_ptr<U> const & r) -{ - return shared_ptr< T >(r, detail::static_cast_tag()); -} - -template<class T, class U> shared_ptr< T > const_pointer_cast(shared_ptr<U> const & r) -{ - return shared_ptr< T >(r, detail::const_cast_tag()); -} - -template<class T, class U> shared_ptr< T > dynamic_pointer_cast(shared_ptr<U> const & r) -{ - return shared_ptr< T >(r, detail::dynamic_cast_tag()); -} - -// shared_*_cast names are deprecated. Use *_pointer_cast instead. - -template<class T, class U> shared_ptr< T > shared_static_cast(shared_ptr<U> const & r) -{ - return shared_ptr< T >(r, detail::static_cast_tag()); -} - -template<class T, class U> shared_ptr< T > shared_dynamic_cast(shared_ptr<U> const & r) -{ - return shared_ptr< T >(r, detail::dynamic_cast_tag()); -} - -template<class T, class U> shared_ptr< T > shared_polymorphic_cast(shared_ptr<U> const & r) -{ - return shared_ptr< T >(r, detail::polymorphic_cast_tag()); -} - -template<class T, class U> shared_ptr< T > shared_polymorphic_downcast(shared_ptr<U> const & r) -{ - BOOST_ASSERT(dynamic_cast<T *>(r.get()) == r.get()); - return shared_static_cast< T >(r); -} - -// get_pointer() enables boost::mem_fn to recognize shared_ptr - -template<class T> inline T * get_pointer(shared_ptr< T > const & p) -{ - return p.get(); -} - -// operator<< - -#if defined(__GNUC__) && (__GNUC__ < 3) - -template<class Y> std::ostream & operator<< (std::ostream & os, shared_ptr<Y> const & p) -{ - os << p.get(); - return os; -} - -#else - -# if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1200 && __SGI_STL_PORT) -// MSVC6 has problems finding std::basic_ostream through the using declaration in namespace _STL -using std::basic_ostream; -template<class E, class T, class Y> basic_ostream<E, T> & operator<< (basic_ostream<E, T> & os, shared_ptr<Y> const & p) -# else -template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::basic_ostream<E, T> & os, shared_ptr<Y> const & p) -# endif -{ - os << p.get(); - return os; -} - -#endif - -// get_deleter (experimental) - -#if (defined(__GNUC__) && (__GNUC__ < 3)) || (defined(__EDG_VERSION__) && (__EDG_VERSION__ <= 238)) - -// g++ 2.9x doesn't allow static_cast<X const *>(void *) -// apparently EDG 2.38 also doesn't accept it - -template<class D, class T> D * get_deleter(shared_ptr< T > const & p) -{ - void const * q = p._internal_get_deleter(typeid(D)); - return const_cast<D *>(static_cast<D const *>(q)); -} - -#else - -template<class D, class T> D * get_deleter(shared_ptr< T > const & p) -{ - return static_cast<D *>(p._internal_get_deleter(typeid(D))); -} - -#endif - -} // namespace boost - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -#endif // #if defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) - -#endif // #ifndef BOOST_SHARED_PTR_132_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/serialization/detail/shared_ptr_nmt_132.hpp b/3rdParty/Boost/src/boost/serialization/detail/shared_ptr_nmt_132.hpp deleted file mode 100644 index 490e7dd..0000000 --- a/3rdParty/Boost/src/boost/serialization/detail/shared_ptr_nmt_132.hpp +++ /dev/null @@ -1,182 +0,0 @@ -#ifndef BOOST_DETAIL_SHARED_PTR_NMT_132_HPP_INCLUDED -#define BOOST_DETAIL_SHARED_PTR_NMT_132_HPP_INCLUDED - -// -// detail/shared_ptr_nmt.hpp - shared_ptr.hpp without member templates -// -// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999. -// Copyright (c) 2001, 2002 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/smart_ptr/shared_ptr.htm for documentation. -// - -#include <boost/assert.hpp> -#include <boost/checked_delete.hpp> -#include <boost/serialization/throw_exception.hpp> -#include <boost/detail/atomic_count.hpp> - -#ifndef BOOST_NO_AUTO_PTR -# include <memory> // for std::auto_ptr -#endif - -#include <algorithm> // for std::swap -#include <functional> // for std::less -#include <new> // for std::bad_alloc - -namespace boost -{ - -template<class T> class shared_ptr -{ -private: - - typedef detail::atomic_count count_type; - -public: - - typedef T element_type; - typedef T value_type; - - explicit shared_ptr(T * p = 0): px(p) - { -#ifndef BOOST_NO_EXCEPTIONS - - try // prevent leak if new throws - { - pn = new count_type(1); - } - catch(...) - { - boost::checked_delete(p); - throw; - } - -#else - - pn = new count_type(1); - - if(pn == 0) - { - boost::checked_delete(p); - boost::serialization::throw_exception(std::bad_alloc()); - } - -#endif - } - - ~shared_ptr() - { - if(--*pn == 0) - { - boost::checked_delete(px); - delete pn; - } - } - - shared_ptr(shared_ptr const & r): px(r.px) // never throws - { - pn = r.pn; - ++*pn; - } - - shared_ptr & operator=(shared_ptr const & r) - { - shared_ptr(r).swap(*this); - return *this; - } - -#ifndef BOOST_NO_AUTO_PTR - - explicit shared_ptr(std::auto_ptr< T > & r) - { - pn = new count_type(1); // may throw - px = r.release(); // fix: moved here to stop leak if new throws - } - - shared_ptr & operator=(std::auto_ptr< T > & r) - { - shared_ptr(r).swap(*this); - return *this; - } - -#endif - - void reset(T * p = 0) - { - BOOST_ASSERT(p == 0 || p != px); - shared_ptr(p).swap(*this); - } - - T & operator*() const // never throws - { - BOOST_ASSERT(px != 0); - return *px; - } - - T * operator->() const // never throws - { - BOOST_ASSERT(px != 0); - return px; - } - - T * get() const // never throws - { - return px; - } - - long use_count() const // never throws - { - return *pn; - } - - bool unique() const // never throws - { - return *pn == 1; - } - - void swap(shared_ptr< T > & other) // never throws - { - std::swap(px, other.px); - std::swap(pn, other.pn); - } - -private: - - T * px; // contained pointer - count_type * pn; // ptr to reference counter -}; - -template<class T, class U> inline bool operator==(shared_ptr< T > const & a, shared_ptr<U> const & b) -{ - return a.get() == b.get(); -} - -template<class T, class U> inline bool operator!=(shared_ptr< T > const & a, shared_ptr<U> const & b) -{ - return a.get() != b.get(); -} - -template<class T> inline bool operator<(shared_ptr< T > const & a, shared_ptr< T > const & b) -{ - return std::less<T*>()(a.get(), b.get()); -} - -template<class T> void swap(shared_ptr< T > & a, shared_ptr< T > & b) -{ - a.swap(b); -} - -// get_pointer() enables boost::mem_fn to recognize shared_ptr - -template<class T> inline T * get_pointer(shared_ptr< T > const & p) -{ - return p.get(); -} - -} // namespace boost - -#endif // #ifndef BOOST_DETAIL_SHARED_PTR_NMT_132_HPP_INCLUDED diff --git a/3rdParty/Boost/src/boost/serialization/detail/stack_constructor.hpp b/3rdParty/Boost/src/boost/serialization/detail/stack_constructor.hpp index de623b0..7c74c18 100644 --- a/3rdParty/Boost/src/boost/serialization/detail/stack_constructor.hpp +++ b/3rdParty/Boost/src/boost/serialization/detail/stack_constructor.hpp @@ -2,14 +2,10 @@ #define BOOST_SERIALIZATION_DETAIL_STACH_CONSTRUCTOR_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif -#if defined(_MSC_VER) && (_MSC_VER <= 1020) -# pragma warning (disable : 4786) // too long name, harmless warning -#endif - /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // collections_load_imp.hpp: serialization for loading stl collections @@ -38,7 +34,7 @@ struct stack_allocate return * address(); } private: - typedef BOOST_DEDUCED_TYPENAME boost::aligned_storage< + typedef typename boost::aligned_storage< sizeof(T), #if BOOST_WORKAROUND(__BORLANDC__,BOOST_TESTED_AT(0x560)) 8 diff --git a/3rdParty/Boost/src/boost/serialization/extended_type_info.hpp b/3rdParty/Boost/src/boost/serialization/extended_type_info.hpp index a4b4b69..d4b57af 100644 --- a/3rdParty/Boost/src/boost/serialization/extended_type_info.hpp +++ b/3rdParty/Boost/src/boost/serialization/extended_type_info.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_EXTENDED_TYPE_INFO_HPP // 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/serialization/extended_type_info_no_rtti.hpp b/3rdParty/Boost/src/boost/serialization/extended_type_info_no_rtti.hpp index 025b3f6..62b2473 100644 --- a/3rdParty/Boost/src/boost/serialization/extended_type_info_no_rtti.hpp +++ b/3rdParty/Boost/src/boost/serialization/extended_type_info_no_rtti.hpp @@ -3,7 +3,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -89,7 +89,7 @@ class extended_type_info_no_rtti : }; static const char * invoke(){ typedef - BOOST_DEDUCED_TYPENAME boost::mpl::if_c< + typename boost::mpl::if_c< tf, defined, undefined @@ -130,15 +130,15 @@ public: va_start(ap, count); switch(count){ case 0: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 0>(ap); + return factory<typename boost::remove_const< T >::type, 0>(ap); case 1: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 1>(ap); + return factory<typename boost::remove_const< T >::type, 1>(ap); case 2: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 2>(ap); + return factory<typename boost::remove_const< T >::type, 2>(ap); case 3: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 3>(ap); + return factory<typename boost::remove_const< T >::type, 3>(ap); case 4: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 4>(ap); + return factory<typename boost::remove_const< T >::type, 4>(ap); default: BOOST_ASSERT(false); // too many arguments // throw exception here? @@ -167,7 +167,7 @@ public: namespace serialization { template<class T> struct extended_type_info_impl { - typedef BOOST_DEDUCED_TYPENAME + typedef typename boost::serialization::extended_type_info_no_rtti< T > type; }; } // namespace serialization diff --git a/3rdParty/Boost/src/boost/serialization/extended_type_info_typeid.hpp b/3rdParty/Boost/src/boost/serialization/extended_type_info_typeid.hpp index 9f09587..6a003be 100644 --- a/3rdParty/Boost/src/boost/serialization/extended_type_info_typeid.hpp +++ b/3rdParty/Boost/src/boost/serialization/extended_type_info_typeid.hpp @@ -3,7 +3,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -114,15 +114,15 @@ public: va_start(ap, count); switch(count){ case 0: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 0>(ap); + return factory<typename boost::remove_const< T >::type, 0>(ap); case 1: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 1>(ap); + return factory<typename boost::remove_const< T >::type, 1>(ap); case 2: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 2>(ap); + return factory<typename boost::remove_const< T >::type, 2>(ap); case 3: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 3>(ap); + return factory<typename boost::remove_const< T >::type, 3>(ap); case 4: - return factory<BOOST_DEDUCED_TYPENAME boost::remove_const< T >::type, 4>(ap); + return factory<typename boost::remove_const< T >::type, 4>(ap); default: BOOST_ASSERT(false); // too many arguments // throw exception here? @@ -150,7 +150,7 @@ public: namespace serialization { template<class T> struct extended_type_info_impl { - typedef BOOST_DEDUCED_TYPENAME + typedef typename boost::serialization::extended_type_info_typeid< T > type; }; } // namespace serialization diff --git a/3rdParty/Boost/src/boost/serialization/factory.hpp b/3rdParty/Boost/src/boost/serialization/factory.hpp index a25bf20..b601af6 100644 --- a/3rdParty/Boost/src/boost/serialization/factory.hpp +++ b/3rdParty/Boost/src/boost/serialization/factory.hpp @@ -3,7 +3,7 @@ /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // 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/serialization/force_include.hpp b/3rdParty/Boost/src/boost/serialization/force_include.hpp index 5578ee8..468be37 100644 --- a/3rdParty/Boost/src/boost/serialization/force_include.hpp +++ b/3rdParty/Boost/src/boost/serialization/force_include.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_FORCE_INCLUDE_HPP // 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/serialization/is_bitwise_serializable.hpp b/3rdParty/Boost/src/boost/serialization/is_bitwise_serializable.hpp index 34eec40..dac597e 100644 --- a/3rdParty/Boost/src/boost/serialization/is_bitwise_serializable.hpp +++ b/3rdParty/Boost/src/boost/serialization/is_bitwise_serializable.hpp @@ -17,7 +17,7 @@ #define BOOST_SERIALIZATION_IS_BITWISE_SERIALIZABLE_HPP // 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/serialization/level.hpp b/3rdParty/Boost/src/boost/serialization/level.hpp index ce507b2..b037f7e 100644 --- a/3rdParty/Boost/src/boost/serialization/level.hpp +++ b/3rdParty/Boost/src/boost/serialization/level.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_LEVEL_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -29,7 +29,6 @@ #include <boost/mpl/int.hpp> #include <boost/mpl/integral_c.hpp> #include <boost/mpl/integral_c_tag.hpp> -#include <boost/mpl/aux_/nttp_decl.hpp> #include <boost/serialization/level_enum.hpp> @@ -43,26 +42,26 @@ template<class T> struct implementation_level_impl { template<class U> struct traits_class_level { - typedef BOOST_DEDUCED_TYPENAME U::level type; + typedef typename U::level type; }; typedef mpl::integral_c_tag tag; // note: at least one compiler complained w/o the full qualification // on basic traits below typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_base_and_derived<boost::serialization::basic_traits, T>, traits_class_level< T >, //else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_fundamental< T >, mpl::int_<primitive_type>, //else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_class< T >, mpl::int_<object_class_info>, //else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_array< T >, #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) mpl::int_<not_serializable>, @@ -70,7 +69,7 @@ struct implementation_level_impl { mpl::int_<object_serializable>, #endif //else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_enum< T >, //#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x560)) // mpl::int_<not_serializable>, @@ -94,7 +93,7 @@ struct implementation_level : { }; -template<class T, BOOST_MPL_AUX_NTTP_DECL(int, L) > +template<class T, int L> inline bool operator>=(implementation_level< T > t, enum level_type l) { return t.value >= (int)l; diff --git a/3rdParty/Boost/src/boost/serialization/level_enum.hpp b/3rdParty/Boost/src/boost/serialization/level_enum.hpp index 11bd17f..baf64e0 100644 --- a/3rdParty/Boost/src/boost/serialization/level_enum.hpp +++ b/3rdParty/Boost/src/boost/serialization/level_enum.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_LEVEL_ENUM_HPP // 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/serialization/list.hpp b/3rdParty/Boost/src/boost/serialization/list.hpp index 469bb23..63d3b47 100644 --- a/3rdParty/Boost/src/boost/serialization/list.hpp +++ b/3rdParty/Boost/src/boost/serialization/list.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_LIST_HPP // 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/serialization/map.hpp b/3rdParty/Boost/src/boost/serialization/map.hpp index 624290d..11a3d6b 100644 --- a/3rdParty/Boost/src/boost/serialization/map.hpp +++ b/3rdParty/Boost/src/boost/serialization/map.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_MAP_HPP // 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/serialization/nvp.hpp b/3rdParty/Boost/src/boost/serialization/nvp.hpp index 2d7f4ed..f33707c 100644 --- a/3rdParty/Boost/src/boost/serialization/nvp.hpp +++ b/3rdParty/Boost/src/boost/serialization/nvp.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_NVP_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -20,10 +20,6 @@ #include <boost/config.hpp> #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/mpl/integral_c.hpp> #include <boost/mpl/integral_c_tag.hpp> @@ -104,7 +100,6 @@ nvp< T > make_nvp(const char * name, T & t){ // Partial Template Specialization and doing so would mean that wrappers // wouldn't be treated the same on different platforms. This would // break archive portability. Leave this here as reminder not to use it !!! -#if 0 // #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template <class T> struct implementation_level<nvp< T > > @@ -123,7 +118,6 @@ struct tracking_level<nvp< T > > BOOST_STATIC_CONSTANT(int, value = tracking_level::type::value); }; -#endif } // seralization } // boost diff --git a/3rdParty/Boost/src/boost/serialization/optional.hpp b/3rdParty/Boost/src/boost/serialization/optional.hpp index 929fa07..4024cf5 100644 --- a/3rdParty/Boost/src/boost/serialization/optional.hpp +++ b/3rdParty/Boost/src/boost/serialization/optional.hpp @@ -10,7 +10,7 @@ #ifndef BOOST_SERIALIZATION_OPTIONAL_HPP_ #define BOOST_SERIALIZATION_OPTIONAL_HPP_ -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -90,37 +90,6 @@ void serialize( boost::serialization::split_free(ar, t, version); } -// the following would be slightly more efficient. But it -// would mean that archives created with programs that support -// TPS wouldn't be readable by programs that don't support TPS. -// Hence we decline to support this otherwise convenient optimization. -//#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#if 0 - -template <class T> -struct implementation_level<optional< T > > -{ - typedef mpl::integral_c_tag tag; - typedef mpl::int_<boost::serialization::object_serializable> type; - BOOST_STATIC_CONSTANT( - int , - value = boost::serialization::implementation_level::type::value - ); -}; - -template<class T> -struct tracking_level<optional< T > > -{ - typedef mpl::integral_c_tag tag; - typedef mpl::int_<boost::serialization::track_never> type; - BOOST_STATIC_CONSTANT( - int , - value = boost::serialization::tracking_level::type::value - ); -}; - -#endif - } // serialization } // namespace boost diff --git a/3rdParty/Boost/src/boost/serialization/pfto.hpp b/3rdParty/Boost/src/boost/serialization/pfto.hpp index 8d98463..0370d28 100644 --- a/3rdParty/Boost/src/boost/serialization/pfto.hpp +++ b/3rdParty/Boost/src/boost/serialization/pfto.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_PFTO_HPP // 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/serialization/serialization.hpp b/3rdParty/Boost/src/boost/serialization/serialization.hpp index f17e8dd..8462b59 100644 --- a/3rdParty/Boost/src/boost/serialization/serialization.hpp +++ b/3rdParty/Boost/src/boost/serialization/serialization.hpp @@ -2,11 +2,11 @@ #define BOOST_SERIALIZATION_SERIALIZATION_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif -#if defined(_MSC_VER) && (_MSC_VER >= 1310) +#if defined(_MSC_VER) # pragma warning (disable : 4675) // suppress ADL warning #endif diff --git a/3rdParty/Boost/src/boost/serialization/set.hpp b/3rdParty/Boost/src/boost/serialization/set.hpp index 4bb69ab..6882fb0 100644 --- a/3rdParty/Boost/src/boost/serialization/set.hpp +++ b/3rdParty/Boost/src/boost/serialization/set.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_SET_HPP // 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/serialization/shared_ptr.hpp b/3rdParty/Boost/src/boost/serialization/shared_ptr.hpp index 37f95e3..f595678 100644 --- a/3rdParty/Boost/src/boost/serialization/shared_ptr.hpp +++ b/3rdParty/Boost/src/boost/serialization/shared_ptr.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_SHARED_PTR_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -25,13 +25,14 @@ #include <boost/detail/workaround.hpp> #include <boost/shared_ptr.hpp> +#include <boost/serialization/shared_ptr_helper.hpp> #include <boost/serialization/split_free.hpp> #include <boost/serialization/nvp.hpp> #include <boost/serialization/version.hpp> #include <boost/serialization/tracking.hpp> /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// shared_ptr serialization traits +// boost:: shared_ptr serialization traits // version 1 to distinguish from boost 1.32 version. Note: we can only do this // for a template when the compiler supports partial template specialization @@ -42,7 +43,7 @@ struct version< ::boost::shared_ptr< T > > { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) - typedef BOOST_DEDUCED_TYPENAME mpl::int_<1> type; + typedef typename mpl::int_<1> type; #else typedef mpl::int_<1> type; #endif @@ -57,7 +58,7 @@ struct tracking_level< ::boost::shared_ptr< T > > { typedef mpl::integral_c_tag tag; #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) - typedef BOOST_DEDUCED_TYPENAME mpl::int_< ::boost::serialization::track_never> type; + typedef typename mpl::int_< ::boost::serialization::track_never> type; #else typedef mpl::int_< ::boost::serialization::track_never> type; #endif @@ -91,7 +92,7 @@ struct null_deleter { }; /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// serialization for shared_ptr +// serialization for boost::shared_ptr template<class Archive, class T> inline void save( @@ -120,9 +121,6 @@ inline void load( BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; if(file_version < 1){ - //ar.register_type(static_cast< - // boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter< T > > * - //>(NULL)); ar.register_type(static_cast< boost_132::detail::sp_counted_base_impl<T *, null_deleter > * >(NULL)); @@ -130,15 +128,22 @@ inline void load( ar >> boost::serialization::make_nvp("px", sp.px); ar >> boost::serialization::make_nvp("pn", sp.pn); // got to keep the sps around so the sp.pns don't disappear - ar.append(sp); + boost::serialization::shared_ptr_helper<boost::shared_ptr> & h = + ar.template get_helper< + shared_ptr_helper<boost::shared_ptr> + >(); + h.append(sp); r = sp.get(); } else{ ar >> boost::serialization::make_nvp("px", r); } - ar.reset(t,r); + shared_ptr_helper<boost::shared_ptr> & h = + ar.template get_helper< + boost::serialization::shared_ptr_helper<boost::shared_ptr> + >(); + h.reset(t,r); } - #else template<class Archive, class T> inline void load( @@ -152,7 +157,11 @@ inline void load( BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); T* r; ar >> boost::serialization::make_nvp("px", r); - ar.reset(t,r); + boost::serialization::shared_ptr_helper<boost::shared_ptr> & h = + ar.template get_helper< + shared_ptr_helper<boost::shared_ptr> + >(); + h.reset(t,r); } #endif @@ -174,4 +183,97 @@ inline void serialize( } // namespace serialization } // namespace boost +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// std::shared_ptr serialization traits +// version 1 to distinguish from boost 1.32 version. Note: we can only do this +// for a template when the compiler supports partial template specialization + +#ifndef BOOST_NO_CXX11_SMART_PTR +#include <boost/static_assert.hpp> + +// note: we presume that any compiler/library which supports C++11 +// std::pointers also supports template partial specialization +// trap here if such presumption were to turn out to wrong!!! +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + BOOST_STATIC_ASSERT(false); +#endif + +namespace boost { +namespace serialization{ + template<class T> + struct version< ::std::shared_ptr< T > > { + typedef mpl::integral_c_tag tag; + typedef mpl::int_<1> type; + BOOST_STATIC_CONSTANT(int, value = type::value); + }; + // don't track shared pointers + template<class T> + struct tracking_level< ::std::shared_ptr< T > > { + typedef mpl::integral_c_tag tag; + typedef mpl::int_< ::boost::serialization::track_never> type; + BOOST_STATIC_CONSTANT(int, value = type::value); + }; +}} +// the following just keeps older programs from breaking +#define BOOST_SERIALIZATION_SHARED_PTR(T) + +namespace boost { +namespace serialization{ + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// serialization for std::shared_ptr + +template<class Archive, class T> +inline void save( + Archive & ar, + const std::shared_ptr< T > &t, + const unsigned int /* file_version */ +){ + // The most common cause of trapping here would be serializing + // something like shared_ptr<int>. This occurs because int + // is never tracked by default. Wrap int in a trackable type + BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); + const T * t_ptr = t.get(); + ar << boost::serialization::make_nvp("px", t_ptr); +} + +template<class Archive, class T> +inline void load( + Archive & ar, + std::shared_ptr< T > &t, + const unsigned int /*file_version*/ +){ + // The most common cause of trapping here would be serializing + // something like shared_ptr<int>. This occurs because int + // is never tracked by default. Wrap int in a trackable type + BOOST_STATIC_ASSERT((tracking_level< T >::value != track_never)); + T* r; + ar >> boost::serialization::make_nvp("px", r); + boost::serialization::shared_ptr_helper<std::shared_ptr> & h = + ar.template get_helper< + shared_ptr_helper<std::shared_ptr> + >(); + h.reset(t,r); +} + +template<class Archive, class T> +inline void serialize( + Archive & ar, + std::shared_ptr< T > &t, + const unsigned int file_version +){ + // correct shared_ptr serialization depends upon object tracking + // being used. + BOOST_STATIC_ASSERT( + boost::serialization::tracking_level< T >::value + != boost::serialization::track_never + ); + boost::serialization::split_free(ar, t, file_version); +} + +} // namespace serialization +} // namespace boost + +#endif // BOOST_NO_CXX11_SMART_PTR + #endif // BOOST_SERIALIZATION_SHARED_PTR_HPP diff --git a/3rdParty/Boost/src/boost/serialization/shared_ptr_132.hpp b/3rdParty/Boost/src/boost/serialization/shared_ptr_132.hpp deleted file mode 100644 index 9bcefe0..0000000 --- a/3rdParty/Boost/src/boost/serialization/shared_ptr_132.hpp +++ /dev/null @@ -1,222 +0,0 @@ -#ifndef BOOST_SERIALIZATION_SHARED_PTR_132_HPP -#define BOOST_SERIALIZATION_SHARED_PTR_132_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.hpp: serialization for boost shared pointer - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -// note: totally unadvised hack to gain access to private variables -// in shared_ptr and shared_count. Unfortunately its the only way to -// do this without changing shared_ptr and shared_count -// the best we can do is to detect a conflict here -#include <boost/config.hpp> - -#include <list> -#include <cstddef> // NULL - -#include <boost/serialization/assume_abstract.hpp> -#include <boost/serialization/split_free.hpp> -#include <boost/serialization/nvp.hpp> -#include <boost/serialization/tracking.hpp> -#include <boost/serialization/void_cast.hpp> - -// mark base class as an (uncreatable) base class -#include <boost/serialization/detail/shared_ptr_132.hpp> - -///////////////////////////////////////////////////////////// -// Maintain a couple of lists of loaded shared pointers of the old previous -// version (1.32) - -namespace boost_132 { -namespace serialization { -namespace detail { - -struct null_deleter { - void operator()(void const *) const {} -}; - -} // namespace detail -} // namespace serialization -} // namespace boost_132 - -///////////////////////////////////////////////////////////// -// sp_counted_base_impl serialization - -namespace boost { -namespace serialization { - -template<class Archive, class P, class D> -inline void serialize( - Archive & /* ar */, - boost_132::detail::sp_counted_base_impl<P, D> & /* t */, - const unsigned int /*file_version*/ -){ - // register the relationship between each derived class - // its polymorphic base - boost::serialization::void_cast_register< - boost_132::detail::sp_counted_base_impl<P, D>, - boost_132::detail::sp_counted_base - >( - static_cast<boost_132::detail::sp_counted_base_impl<P, D> *>(NULL), - static_cast<boost_132::detail::sp_counted_base *>(NULL) - ); -} - -template<class Archive, class P, class D> -inline void save_construct_data( - Archive & ar, - const - boost_132::detail::sp_counted_base_impl<P, D> *t, - const BOOST_PFTO unsigned int /* file_version */ -){ - // variables used for construction - ar << boost::serialization::make_nvp("ptr", t->ptr); -} - -template<class Archive, class P, class D> -inline void load_construct_data( - Archive & ar, - boost_132::detail::sp_counted_base_impl<P, D> * t, - const unsigned int /* file_version */ -){ - P ptr_; - ar >> boost::serialization::make_nvp("ptr", ptr_); - // ::new(t)boost_132::detail::sp_counted_base_impl<P, D>(ptr_, D()); - // placement - // note: the original ::new... above is replaced by the one here. This one - // creates all new objects with a null_deleter so that after the archive - // is finished loading and the shared_ptrs are destroyed - the underlying - // raw pointers are NOT deleted. This is necessary as they are used by the - // new system as well. - ::new(t)boost_132::detail::sp_counted_base_impl< - P, - boost_132::serialization::detail::null_deleter - >( - ptr_, boost_132::serialization::detail::null_deleter() - ); // placement new - // compensate for that fact that a new shared count always is - // initialized with one. the add_ref_copy below will increment it - // every time its serialized so without this adjustment - // the use and weak counts will be off by one. - t->use_count_ = 0; -} - -} // serialization -} // namespace boost - -///////////////////////////////////////////////////////////// -// shared_count serialization - -namespace boost { -namespace serialization { - -template<class Archive> -inline void save( - Archive & ar, - const boost_132::detail::shared_count &t, - const unsigned int /* file_version */ -){ - ar << boost::serialization::make_nvp("pi", t.pi_); -} - -template<class Archive> -inline void load( - Archive & ar, - boost_132::detail::shared_count &t, - const unsigned int /* file_version */ -){ - ar >> boost::serialization::make_nvp("pi", t.pi_); - if(NULL != t.pi_) - t.pi_->add_ref_copy(); -} - -} // serialization -} // namespace boost - -BOOST_SERIALIZATION_SPLIT_FREE(boost_132::detail::shared_count) - -///////////////////////////////////////////////////////////// -// implement serialization for shared_ptr< T > - -namespace boost { -namespace serialization { - -template<class Archive, class T> -inline void save( - Archive & ar, - const boost_132::shared_ptr< T > &t, - const unsigned int /* file_version */ -){ - // only the raw pointer has to be saved - // the ref count is maintained automatically as shared pointers are loaded - ar.register_type(static_cast< - boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter< T > > * - >(NULL)); - ar << boost::serialization::make_nvp("px", t.px); - ar << boost::serialization::make_nvp("pn", t.pn); -} - -template<class Archive, class T> -inline void load( - Archive & ar, - boost_132::shared_ptr< T > &t, - const unsigned int /* file_version */ -){ - // only the raw pointer has to be saved - // the ref count is maintained automatically as shared pointers are loaded - ar.register_type(static_cast< - boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter< T > > * - >(NULL)); - ar >> boost::serialization::make_nvp("px", t.px); - ar >> boost::serialization::make_nvp("pn", t.pn); -} - -template<class Archive, class T> -inline void serialize( - Archive & ar, - boost_132::shared_ptr< T > &t, - const unsigned int file_version -){ - // correct shared_ptr serialization depends upon object tracking - // being used. - BOOST_STATIC_ASSERT( - boost::serialization::tracking_level< T >::value - != boost::serialization::track_never - ); - boost::serialization::split_free(ar, t, file_version); -} - -} // serialization -} // namespace boost - -// note: change below uses null_deleter -// This macro is used to export GUIDS for shared pointers to allow -// the serialization system to export them properly. David Tonge -#define BOOST_SHARED_POINTER_EXPORT_GUID(T, K) \ - typedef boost_132::detail::sp_counted_base_impl< \ - T *, \ - boost::checked_deleter< T > \ - > __shared_ptr_ ## T; \ - BOOST_CLASS_EXPORT_GUID(__shared_ptr_ ## T, "__shared_ptr_" K) \ - BOOST_CLASS_EXPORT_GUID(T, K) \ - /**/ - -#define BOOST_SHARED_POINTER_EXPORT(T) \ - BOOST_SHARED_POINTER_EXPORT_GUID( \ - T, \ - BOOST_PP_STRINGIZE(T) \ - ) \ - /**/ - -#endif // BOOST_SERIALIZATION_SHARED_PTR_132_HPP diff --git a/3rdParty/Boost/src/boost/serialization/shared_ptr_helper.hpp b/3rdParty/Boost/src/boost/serialization/shared_ptr_helper.hpp new file mode 100644 index 0000000..9dace87 --- /dev/null +++ b/3rdParty/Boost/src/boost/serialization/shared_ptr_helper.hpp @@ -0,0 +1,212 @@ +#ifndef BOOST_SERIALIZATION_SHARED_PTR_HELPER_HPP +#define BOOST_SERIALIZATION_SHARED_PTR_HELPER_HPP + +// MS compatible compilers support #pragma once +#if defined(_MSC_VER) +# 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 <map> +#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/mpl/if.hpp> + +#include <boost/serialization/type_info_implementation.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 { +namespace serialization { + +class extended_type_info; + +#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS +template<class Archive, template<class U> class SPT > +void load( + Archive & ar, + SPT< class U > &t, + const unsigned int file_version +); +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// a common class for holding various types of shared pointers + +template<template<class T> class SPT> +class shared_ptr_helper { + typedef std::map< + const void *, // address of object + SPT<void> // address shared ptr to single instance + > object_shared_pointer_map; + + // 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. + object_shared_pointer_map * m_o_sp; + + struct null_deleter { + void operator()(void const *) const {} + }; + +#if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) || defined(BOOST_MSVC) +public: +#else + template<class Archive, class U> + friend void boost::serialization::load( + Archive & ar, + SPT< U > &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; + BOOST_ARCHIVE_DECL(void) + append(const boost_132::shared_ptr<const void> & t){ + if(NULL == m_pointers_132) + m_pointers_132 = new std::list<boost_132::shared_ptr<const void> >; + m_pointers_132->push_back(t); + } + #endif + + struct non_polymorphic { + template<class U> + static const boost::serialization::extended_type_info * + get_object_type(U & ){ + return & boost::serialization::singleton< + typename + boost::serialization::type_info_implementation< U >::type + >::get_const_instance(); + } + }; + struct polymorphic { + template<class U> + static const boost::serialization::extended_type_info * + get_object_type(U & u){ + return boost::serialization::singleton< + typename + boost::serialization::type_info_implementation< U >::type + >::get_const_instance().get_derived_extended_type_info(u); + } + }; + +public: + template<class T> + void reset(SPT< 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's eti. This is effectively + // the object type identifer + typedef typename mpl::if_< + is_polymorphic< T >, + polymorphic, + non_polymorphic + >::type type; + + const boost::serialization::extended_type_info * true_type + = type::get_object_type(*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( + boost::archive::archive_exception( + boost::archive::archive_exception::unregistered_class, + this_type->get_debug_info() + ) + ); + // get void pointer to the most derived type + // this uniquely identifies the object referred to + // oid = "object identifier" + const void * oid = void_downcast( + *true_type, + *this_type, + t + ); + if(NULL == oid) + boost::serialization::throw_exception( + boost::archive::archive_exception( + boost::archive::archive_exception::unregistered_cast, + true_type->get_debug_info(), + this_type->get_debug_info() + ) + ); + + // make tracking array if necessary + if(NULL == m_o_sp) + m_o_sp = new object_shared_pointer_map; + + typename object_shared_pointer_map::iterator i = m_o_sp->find(oid); + + // if it's a new object + if(i == m_o_sp->end()){ + s.reset(t); + std::pair<typename object_shared_pointer_map::iterator, bool> result; + result = m_o_sp->insert(std::make_pair(oid, s)); + BOOST_ASSERT(result.second); + } + // if the object has already been seen + else{ + s = SPT<T>(i->second, t); + } + } + + shared_ptr_helper() : + m_o_sp(NULL) + #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP + , m_pointers_132(NULL) + #endif + {} + virtual ~shared_ptr_helper(){ + if(NULL != m_o_sp) + delete m_o_sp; + #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP + if(NULL != m_pointers_132) + delete m_pointers_132; + #endif + } +}; + +} // namespace serialization +} // namespace boost + +#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas + +#endif // BOOST_SERIALIZATION_SHARED_PTR_HELPER_HPP diff --git a/3rdParty/Boost/src/boost/serialization/singleton.hpp b/3rdParty/Boost/src/boost/serialization/singleton.hpp index f521590..546118c 100644 --- a/3rdParty/Boost/src/boost/serialization/singleton.hpp +++ b/3rdParty/Boost/src/boost/serialization/singleton.hpp @@ -30,7 +30,7 @@ // // 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/serialization/smart_cast.hpp b/3rdParty/Boost/src/boost/serialization/smart_cast.hpp index c240a55..02edb4b 100644 --- a/3rdParty/Boost/src/boost/serialization/smart_cast.hpp +++ b/3rdParty/Boost/src/boost/serialization/smart_cast.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_SMART_CAST_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -56,6 +56,8 @@ #include <boost/mpl/not.hpp> #include <boost/mpl/identity.hpp> +#include <boost/serialization/throw_exception.hpp> + namespace boost { namespace serialization { namespace smart_cast_impl { @@ -93,15 +95,15 @@ namespace smart_cast_impl { // cross casting will be selected this will work but will // not be the most efficient method. This will conflict with // the original smart_cast motivation. - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME mpl::and_< + typedef typename mpl::eval_if< + typename mpl::and_< mpl::not_<is_base_and_derived< - BOOST_DEDUCED_TYPENAME remove_reference< T >::type, + typename remove_reference< T >::type, U > >, mpl::not_<is_base_and_derived< U, - BOOST_DEDUCED_TYPENAME remove_reference< T >::type + typename remove_reference< T >::type > > >, // borland chokes w/o full qualification here @@ -129,7 +131,7 @@ namespace smart_cast_impl { mpl::identity<non_polymorphic> >::type::cast(u); #else - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< boost::is_polymorphic<U>, mpl::identity<polymorphic>, mpl::identity<non_polymorphic> @@ -159,7 +161,7 @@ namespace smart_cast_impl { static T cast(U * u){ T tmp = dynamic_cast< T >(u); #ifndef NDEBUG - if ( tmp == 0 ) throw std::bad_cast(); + if ( tmp == 0 ) throw_exception(std::bad_cast()); #endif return tmp; } @@ -168,7 +170,7 @@ namespace smart_cast_impl { template<class U> static T cast(U * u){ // if we're in debug mode - #if ! defined(NDEBUG) || defined(__BORLANDC__) && (__BORLANDC__ <= 0x560) + #if 0 //! defined(NDEBUG) || defined(__BORLANDC__) && (__BORLANDC__ <= 0x560) // do a checked dynamic cast return cross::cast(u); #else @@ -178,15 +180,15 @@ namespace smart_cast_impl { // not be the most efficient method. This will conflict with // the original smart_cast motivation. typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME mpl::and_< + typename mpl::eval_if< + typename mpl::and_< mpl::not_<is_base_and_derived< - BOOST_DEDUCED_TYPENAME remove_pointer< T >::type, + typename remove_pointer< T >::type, U > >, mpl::not_<is_base_and_derived< U, - BOOST_DEDUCED_TYPENAME remove_pointer< T >::type + typename remove_pointer< T >::type > > >, // borland chokes w/o full qualification here @@ -201,7 +203,7 @@ namespace smart_cast_impl { static T cast(U * u){ T tmp = dynamic_cast< T >(u); #ifndef NDEBUG - if ( tmp == 0 ) throw std::bad_cast(); + if ( tmp == 0 ) throw_exception(std::bad_cast()); #endif return tmp; } @@ -224,7 +226,7 @@ namespace smart_cast_impl { mpl::identity<non_polymorphic> >::type::cast(u); #else - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< boost::is_polymorphic<U>, mpl::identity<polymorphic>, mpl::identity<non_polymorphic> @@ -265,8 +267,8 @@ namespace smart_cast_impl { template<class T, class U> T smart_cast(U u) { typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME mpl::or_< + typename mpl::eval_if< + typename mpl::or_< boost::is_same<void *, U>, boost::is_same<void *, T>, boost::is_same<const void *, U>, @@ -274,10 +276,10 @@ T smart_cast(U u) { >, mpl::identity<smart_cast_impl::void_pointer< T > >, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if<boost::is_pointer<U>, + typename mpl::eval_if<boost::is_pointer<U>, mpl::identity<smart_cast_impl::pointer< T > >, // else - BOOST_DEDUCED_TYPENAME mpl::eval_if<boost::is_reference<U>, + typename mpl::eval_if<boost::is_reference<U>, mpl::identity<smart_cast_impl::reference< T > >, // else mpl::identity<smart_cast_impl::error< T > diff --git a/3rdParty/Boost/src/boost/serialization/split_free.hpp b/3rdParty/Boost/src/boost/serialization/split_free.hpp index 9dbcd2f..85e2f59 100644 --- a/3rdParty/Boost/src/boost/serialization/split_free.hpp +++ b/3rdParty/Boost/src/boost/serialization/split_free.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_SPLIT_FREE_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -66,8 +66,8 @@ inline void split_free( T & t, const unsigned int file_version ){ - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME Archive::is_saving, + typedef typename mpl::eval_if< + typename Archive::is_saving, mpl::identity</* detail:: */ free_saver<Archive, T> >, mpl::identity</* detail:: */ free_loader<Archive, T> > >::type typex; diff --git a/3rdParty/Boost/src/boost/serialization/split_member.hpp b/3rdParty/Boost/src/boost/serialization/split_member.hpp index 6987945..5f32520 100644 --- a/3rdParty/Boost/src/boost/serialization/split_member.hpp +++ b/3rdParty/Boost/src/boost/serialization/split_member.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_SPLIT_MEMBER_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -61,8 +61,8 @@ template<class Archive, class T> inline void split_member( Archive & ar, T & t, const unsigned int file_version ){ - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< - BOOST_DEDUCED_TYPENAME Archive::is_saving, + typedef typename mpl::eval_if< + typename Archive::is_saving, mpl::identity<detail::member_saver<Archive, T> >, mpl::identity<detail::member_loader<Archive, T> > >::type typex; diff --git a/3rdParty/Boost/src/boost/serialization/state_saver.hpp b/3rdParty/Boost/src/boost/serialization/state_saver.hpp index 69cbe3e..6e6f985 100644 --- a/3rdParty/Boost/src/boost/serialization/state_saver.hpp +++ b/3rdParty/Boost/src/boost/serialization/state_saver.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_STATE_SAVER_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -77,7 +77,7 @@ public: ~state_saver() { #ifndef BOOST_NO_EXCEPTIONS - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< + typedef typename mpl::eval_if< has_nothrow_copy< T >, mpl::identity<restore>, mpl::identity<restore_with_exception> diff --git a/3rdParty/Boost/src/boost/serialization/static_warning.hpp b/3rdParty/Boost/src/boost/serialization/static_warning.hpp index b41791a..d2f23d3 100644 --- a/3rdParty/Boost/src/boost/serialization/static_warning.hpp +++ b/3rdParty/Boost/src/boost/serialization/static_warning.hpp @@ -5,7 +5,7 @@ // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -72,6 +72,7 @@ #include <boost/mpl/bool.hpp> #include <boost/mpl/print.hpp> #include <boost/mpl/eval_if.hpp> +#include <boost/static_assert.hpp> namespace boost { namespace serialization { @@ -101,8 +102,7 @@ struct BOOST_SERIALIZATION_SS {}; #define BOOST_SERIALIZATION_BSW(B, L) \ typedef boost::serialization::BOOST_SERIALIZATION_SS< \ sizeof( boost::serialization::static_warning_test< B, L > ) \ - > BOOST_JOIN(STATIC_WARNING_LINE, L); - + > BOOST_JOIN(STATIC_WARNING_LINE, L) BOOST_STATIC_ASSERT_UNUSED_ATTRIBUTE; #define BOOST_STATIC_WARNING(B) BOOST_SERIALIZATION_BSW(B, __LINE__) #endif // BOOST_SERIALIZATION_STATIC_WARNING_HPP diff --git a/3rdParty/Boost/src/boost/serialization/string.hpp b/3rdParty/Boost/src/boost/serialization/string.hpp index 36d1594..d63df76 100644 --- a/3rdParty/Boost/src/boost/serialization/string.hpp +++ b/3rdParty/Boost/src/boost/serialization/string.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_STRING_HPP // 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/serialization/strong_typedef.hpp b/3rdParty/Boost/src/boost/serialization/strong_typedef.hpp index c6308c2..54a5162 100644 --- a/3rdParty/Boost/src/boost/serialization/strong_typedef.hpp +++ b/3rdParty/Boost/src/boost/serialization/strong_typedef.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_STRONG_TYPEDEF_HPP // 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/serialization/throw_exception.hpp b/3rdParty/Boost/src/boost/serialization/throw_exception.hpp index ed7d810..b67618a 100644 --- a/3rdParty/Boost/src/boost/serialization/throw_exception.hpp +++ b/3rdParty/Boost/src/boost/serialization/throw_exception.hpp @@ -3,7 +3,7 @@ // 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/serialization/tracking.hpp b/3rdParty/Boost/src/boost/serialization/tracking.hpp index fadcbd0..d5c79b8 100644 --- a/3rdParty/Boost/src/boost/serialization/tracking.hpp +++ b/3rdParty/Boost/src/boost/serialization/tracking.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_TRACKING_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -41,24 +41,24 @@ template<class T> struct tracking_level_impl { template<class U> struct traits_class_tracking { - typedef BOOST_DEDUCED_TYPENAME U::tracking type; + typedef typename U::tracking type; }; typedef mpl::integral_c_tag tag; // note: at least one compiler complained w/o the full qualification // on basic traits below typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_base_and_derived<boost::serialization::basic_traits, T>, traits_class_tracking< T >, //else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_pointer< T >, // pointers are not tracked by default mpl::int_<track_never>, //else - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< // for primitives - BOOST_DEDUCED_TYPENAME mpl::equal_to< + typename mpl::equal_to< implementation_level< T >, mpl::int_<primitive_type> >, diff --git a/3rdParty/Boost/src/boost/serialization/tracking_enum.hpp b/3rdParty/Boost/src/boost/serialization/tracking_enum.hpp index e4e4e21..278051e 100644 --- a/3rdParty/Boost/src/boost/serialization/tracking_enum.hpp +++ b/3rdParty/Boost/src/boost/serialization/tracking_enum.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_TRACKING_ENUM_HPP // 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/serialization/traits.hpp b/3rdParty/Boost/src/boost/serialization/traits.hpp index da80009..d338b1b 100644 --- a/3rdParty/Boost/src/boost/serialization/traits.hpp +++ b/3rdParty/Boost/src/boost/serialization/traits.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_TRAITS_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -52,9 +52,9 @@ template< struct traits : public basic_traits { BOOST_STATIC_ASSERT(Version == 0 || Level >= object_class_info); BOOST_STATIC_ASSERT(Tracking == track_never || Level >= object_serializable); - typedef BOOST_DEDUCED_TYPENAME mpl::int_<Level> level; - typedef BOOST_DEDUCED_TYPENAME mpl::int_<Tracking> tracking; - typedef BOOST_DEDUCED_TYPENAME mpl::int_<Version> version; + typedef typename mpl::int_<Level> level; + typedef typename mpl::int_<Tracking> tracking; + typedef typename mpl::int_<Version> version; typedef ETII type_info_implementation; typedef Wrapper is_wrapper; }; diff --git a/3rdParty/Boost/src/boost/serialization/type_info_implementation.hpp b/3rdParty/Boost/src/boost/serialization/type_info_implementation.hpp index 00eb152..2c033fc 100644 --- a/3rdParty/Boost/src/boost/serialization/type_info_implementation.hpp +++ b/3rdParty/Boost/src/boost/serialization/type_info_implementation.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_TYPE_INFO_IMPLEMENTATION_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -35,17 +35,17 @@ template<class T> struct type_info_implementation { template<class U> struct traits_class_typeinfo_implementation { - typedef BOOST_DEDUCED_TYPENAME U::type_info_implementation::type type; + typedef typename U::type_info_implementation::type type; }; // note: at least one compiler complained w/o the full qualification // on basic traits below typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_base_and_derived<boost::serialization::basic_traits, T>, traits_class_typeinfo_implementation< T >, //else mpl::identity< - BOOST_DEDUCED_TYPENAME extended_type_info_impl< T >::type + typename extended_type_info_impl< T >::type > >::type type; }; diff --git a/3rdParty/Boost/src/boost/serialization/utility.hpp b/3rdParty/Boost/src/boost/serialization/utility.hpp index 3d69abc..4867a4a 100644 --- a/3rdParty/Boost/src/boost/serialization/utility.hpp +++ b/3rdParty/Boost/src/boost/serialization/utility.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_UTILITY_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -38,7 +38,7 @@ inline void serialize( // note: we remove any const-ness on the first argument. The reason is that // for stl maps, the type saved is pair<const key, T). We remove // the const-ness in order to be able to load it. - typedef BOOST_DEDUCED_TYPENAME boost::remove_const<F>::type typef; + typedef typename boost::remove_const<F>::type typef; ar & boost::serialization::make_nvp("first", const_cast<typef &>(p.first)); ar & boost::serialization::make_nvp("second", p.second); } diff --git a/3rdParty/Boost/src/boost/serialization/vector.hpp b/3rdParty/Boost/src/boost/serialization/vector.hpp index 7520c09..3af1d67 100644 --- a/3rdParty/Boost/src/boost/serialization/vector.hpp +++ b/3rdParty/Boost/src/boost/serialization/vector.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_VECTOR_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -121,9 +121,9 @@ inline void save( const std::vector<U, Allocator> &t, const unsigned int file_version ){ - typedef BOOST_DEDUCED_TYPENAME + typedef typename boost::serialization::use_array_optimization<Archive>::template apply< - BOOST_DEDUCED_TYPENAME remove_const<U>::type + typename remove_const<U>::type >::type use_optimized; save(ar,t,file_version, use_optimized()); } @@ -141,9 +141,9 @@ inline void load( return; } #endif - typedef BOOST_DEDUCED_TYPENAME + typedef typename boost::serialization::use_array_optimization<Archive>::template apply< - BOOST_DEDUCED_TYPENAME remove_const<U>::type + typename remove_const<U>::type >::type use_optimized; load(ar,t,file_version, use_optimized()); } @@ -159,8 +159,6 @@ inline void serialize( boost::serialization::split_free(ar, t, file_version); } -#if ! BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // vector<bool> template<class Archive, class Allocator> @@ -207,8 +205,6 @@ inline void serialize( boost::serialization::split_free(ar, t, file_version); } -#endif // BOOST_WORKAROUND - } // serialization } // namespace boost diff --git a/3rdParty/Boost/src/boost/serialization/version.hpp b/3rdParty/Boost/src/boost/serialization/version.hpp index ef3dff2..21a74d7 100644 --- a/3rdParty/Boost/src/boost/serialization/version.hpp +++ b/3rdParty/Boost/src/boost/serialization/version.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_VERSION_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -37,14 +37,14 @@ struct version { template<class U> struct traits_class_version { - typedef BOOST_DEDUCED_TYPENAME U::version type; + typedef typename U::version type; }; typedef mpl::integral_c_tag tag; // note: at least one compiler complained w/o the full qualification // on basic traits below typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if< + typename mpl::eval_if< is_base_and_derived<boost::serialization::basic_traits,T>, traits_class_version< T >, mpl::int_<0> diff --git a/3rdParty/Boost/src/boost/serialization/void_cast.hpp b/3rdParty/Boost/src/boost/serialization/void_cast.hpp index b5b1e85..61b6449 100644 --- a/3rdParty/Boost/src/boost/serialization/void_cast.hpp +++ b/3rdParty/Boost/src/boost/serialization/void_cast.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_VOID_CAST_HPP // MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#if defined(_MSC_VER) # pragma once #endif @@ -181,13 +181,13 @@ void_caster_primitive<Derived, Base>::void_caster_primitive() : void_caster( & type_info_implementation<Derived>::type::get_const_instance(), & type_info_implementation<Base>::type::get_const_instance(), - // note:I wanted to display from 0 here, but at least one compiler + // note:I wanted to displace from 0 here, but at least one compiler // treated 0 by not shifting it at all. reinterpret_cast<std::ptrdiff_t>( static_cast<Derived *>( - reinterpret_cast<Base *>(1) + reinterpret_cast<Base *>(8) ) - ) - 1 + ) - 8 ) { recursive_register(); @@ -248,7 +248,7 @@ struct void_caster_base : public void_caster { typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if<boost::is_virtual_base_of<Base,Derived>, + typename mpl::eval_if<boost::is_virtual_base_of<Base,Derived>, mpl::identity< void_cast_detail::void_caster_virtual_base<Derived, Base> > @@ -268,7 +268,7 @@ inline const void_cast_detail::void_caster & void_cast_register( Base const * /* bnull = NULL */ ){ typedef - BOOST_DEDUCED_TYPENAME mpl::eval_if<boost::is_virtual_base_of<Base,Derived>, + typename mpl::eval_if<boost::is_virtual_base_of<Base,Derived>, mpl::identity< void_cast_detail::void_caster_virtual_base<Derived, Base> > diff --git a/3rdParty/Boost/src/boost/serialization/void_cast_fwd.hpp b/3rdParty/Boost/src/boost/serialization/void_cast_fwd.hpp index c94adb2..def61d5 100644 --- a/3rdParty/Boost/src/boost/serialization/void_cast_fwd.hpp +++ b/3rdParty/Boost/src/boost/serialization/void_cast_fwd.hpp @@ -2,7 +2,7 @@ #define BOOST_SERIALIZATION_VOID_CAST_FWD_HPP // 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/serialization/wrapper.hpp b/3rdParty/Boost/src/boost/serialization/wrapper.hpp index eeb4333..6a2a730 100644 --- a/3rdParty/Boost/src/boost/serialization/wrapper.hpp +++ b/3rdParty/Boost/src/boost/serialization/wrapper.hpp @@ -41,7 +41,7 @@ struct is_wrapper_impl : template<class T> struct is_wrapper { - typedef BOOST_DEDUCED_TYPENAME is_wrapper_impl<const T>::type type; + typedef typename is_wrapper_impl<const T>::type type; }; } // serialization |