Updated Boost libraries
This commit is contained in:
@@ -19,11 +19,12 @@
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <valarray>
|
||||
|
||||
namespace boost { namespace serialization { namespace detail {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
namespace detail {
|
||||
|
||||
template <class T, class Allocator>
|
||||
T* get_data(STD::vector<T,Allocator>& v)
|
||||
@@ -37,7 +38,6 @@ T* get_data(STD::vector<T,Allocator> const & v)
|
||||
return get_data(const_cast<STD::vector<T,Allocator>&>(v));
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
T* get_data(STD::valarray<T>& v)
|
||||
{
|
||||
@@ -50,6 +50,12 @@ const T* get_data(STD::valarray<T> const& v)
|
||||
return get_data(const_cast<STD::valarray<T>&>(v));
|
||||
}
|
||||
|
||||
} } } //namespace boost::serialization::detail
|
||||
} // detail
|
||||
} // serialization
|
||||
} // boost
|
||||
|
||||
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
#undef STD
|
||||
#endif
|
||||
|
||||
#endif // BOOST_SERIALIZATION_DETAIL_GET_DATA_HPP
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
}
|
||||
virtual void destroy(void const * const p) const{
|
||||
boost::serialization::access::destroy(
|
||||
static_cast<T const * const>(p)
|
||||
static_cast<T const *>(p)
|
||||
);
|
||||
//delete static_cast<T const * const>(p) ;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
}
|
||||
virtual void destroy(void const * const p) const {
|
||||
boost::serialization::access::destroy(
|
||||
static_cast<T const * const>(p)
|
||||
static_cast<T const *>(p)
|
||||
);
|
||||
//delete static_cast<T const * const>(p);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <boost/preprocessor/facilities/empty.hpp>
|
||||
|
||||
namespace std{
|
||||
#if defined(__LIBCOMO__) || defined(__QNXNTO__)
|
||||
#if defined(__LIBCOMO__)
|
||||
using ::va_list;
|
||||
#endif
|
||||
} // namespace std
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
# if defined(__MWERKS__)
|
||||
# define BOOST_DLLEXPORT __declspec(dllexport)
|
||||
# elif defined(__GNUC__) && (__GNUC__ >= 3)
|
||||
# define BOOST_USED __attribute__ ((used))
|
||||
# define BOOST_USED __attribute__ ((__used__))
|
||||
# elif defined(__IBMCPP__) && (__IBMCPP__ >= 1110)
|
||||
# define BOOST_USED __attribute__ ((used))
|
||||
# define BOOST_USED __attribute__ ((__used__))
|
||||
# elif defined(__INTEL_COMPILER) && (BOOST_INTEL_CXX_VERSION >= 800)
|
||||
# define BOOST_USED __attribute__ ((used))
|
||||
# define BOOST_USED __attribute__ ((__used__))
|
||||
# endif
|
||||
#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 {
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
namespace boost { namespace serialization {
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// valarray< T >
|
||||
@@ -45,7 +46,6 @@ void save( Archive & ar, const STD::valarray<U> &t, const unsigned int /*file_ve
|
||||
ar << make_array(detail::get_data(t), t.size());
|
||||
}
|
||||
|
||||
|
||||
template<class Archive, class U>
|
||||
void load( Archive & ar, STD::valarray<U> &t, const unsigned int /*file_version*/ )
|
||||
{
|
||||
|
||||
@@ -35,6 +35,14 @@
|
||||
#define BOOST_SERIALIZATION_VECTOR_VERSIONED(V) (V==4 || V==5)
|
||||
#endif
|
||||
|
||||
// function specializations must be defined in the appropriate
|
||||
// namespace - boost::serialization
|
||||
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
#define STD _STLP_STD
|
||||
#else
|
||||
#define STD std
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace serialization {
|
||||
|
||||
@@ -207,5 +215,6 @@ inline void serialize(
|
||||
#include <boost/serialization/collection_traits.hpp>
|
||||
|
||||
BOOST_SERIALIZATION_COLLECTION_TRAITS(std::vector)
|
||||
#undef STD
|
||||
|
||||
#endif // BOOST_SERIALIZATION_VECTOR_HPP
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#error Boost.Serialization cannot be compatible with both 1.35 and 1.36-1.40 files
|
||||
#endif
|
||||
#else
|
||||
#define BOOST_SERIALIZATION_VECTOR_VERSIONED(V) (V==4)
|
||||
#define BOOST_SERIALIZATION_VECTOR_VERSIONED(V) (V>4)
|
||||
#endif
|
||||
|
||||
#include <boost/serialization/vector.hpp>
|
||||
|
||||
Reference in New Issue
Block a user