|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r50644 - in branches/release: boost/archive boost/archive/impl boost/archive/iterators boost/serialization libs/serialization/src libs/serialization/vc7ide
From: ramey_at_[hidden]
Date: 2009-01-16 16:11:59
Author: ramey
Date: 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
New Revision: 50644
URL: http://svn.boost.org/trac/boost/changeset/50644
Log:
Merge serialization library from trunk into release branch
Text files modified:
branches/release/boost/archive/codecvt_null.hpp | 2 +-
branches/release/boost/archive/impl/basic_binary_iprimitive.ipp | 13 +++++--------
branches/release/boost/archive/impl/basic_binary_oprimitive.ipp | 13 +++++--------
branches/release/boost/archive/impl/basic_xml_grammar.hpp | 6 ++++++
branches/release/boost/archive/iterators/base64_from_binary.hpp | 9 ++++++++-
branches/release/boost/serialization/export.hpp | 27 +++++++++++++++++----------
branches/release/boost/serialization/extended_type_info_typeid.hpp | 2 +-
branches/release/boost/serialization/optional.hpp | 4 ++--
branches/release/boost/serialization/shared_ptr_132.hpp | 2 +-
branches/release/boost/serialization/slist.hpp | 2 +-
branches/release/boost/serialization/vector.hpp | 12 ++++++++++--
branches/release/libs/serialization/src/basic_iarchive.cpp | 2 +-
branches/release/libs/serialization/vc7ide/BoostSerializationLibrary.sln | 8 ++++----
branches/release/libs/serialization/vc7ide/test_no_rtti.vcproj | 18 ++++++++++++++++++
14 files changed, 80 insertions(+), 40 deletions(-)
Modified: branches/release/boost/archive/codecvt_null.hpp
==============================================================================
--- branches/release/boost/archive/codecvt_null.hpp (original)
+++ branches/release/boost/archive/codecvt_null.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -25,7 +25,7 @@
#if defined(BOOST_NO_STDC_NAMESPACE)
using ::codecvt;
using ::mbstate_t;
- using ::size_t
+ using ::size_t;
#endif
namespace boost {
Modified: branches/release/boost/archive/impl/basic_binary_iprimitive.ipp
==============================================================================
--- branches/release/boost/archive/impl/basic_binary_iprimitive.ipp (original)
+++ branches/release/boost/archive/impl/basic_binary_iprimitive.ipp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -182,15 +182,12 @@
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_iprimitive<Archive, Elem, Tr>::~basic_binary_iprimitive(){
// push back unread characters
- int result = static_cast<detail::input_streambuf_access<Elem, Tr> &>(
- m_sb
- ).sync();
//destructor can't throw !
- //if(0 != result){
- // boost::serialization::throw_exception(
- // archive_exception(archive_exception::stream_error)
- // );
- //}
+ try{
+ static_cast<detail::input_streambuf_access<Elem, Tr> &>(m_sb).sync();
+ }
+ catch(...){
+ }
}
} // namespace archive
Modified: branches/release/boost/archive/impl/basic_binary_oprimitive.ipp
==============================================================================
--- branches/release/boost/archive/impl/basic_binary_oprimitive.ipp (original)
+++ branches/release/boost/archive/impl/basic_binary_oprimitive.ipp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -152,15 +152,12 @@
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
basic_binary_oprimitive<Archive, Elem, Tr>::~basic_binary_oprimitive(){
// flush buffer
- int result = static_cast<detail::output_streambuf_access<Elem, Tr> &>(
- m_sb
- ).sync();
//destructor can't throw
- //if(0 != result){
- // boost::serialization::throw_exception(
- // archive_exception(archive_exception::stream_error)
- // );
- //}
+ try{
+ static_cast<detail::output_streambuf_access<Elem, Tr> &>(m_sb).sync();
+ }
+ catch(...){
+ }
}
} // namespace archive
Modified: branches/release/boost/archive/impl/basic_xml_grammar.hpp
==============================================================================
--- branches/release/boost/archive/impl/basic_xml_grammar.hpp (original)
+++ branches/release/boost/archive/impl/basic_xml_grammar.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -64,7 +64,13 @@
#define arg xarg
#endif
+// spirit stuff
+#if (defined __BORLANDC__) && (__BORLANDC__ < 0x593) \
+ || (defined _MSC_VER) && (_MSC_VER <= 1300)
#include <boost/spirit/utility/chset.hpp>
+#else
+#include <boost/spirit/include/classic_chset.hpp>
+#endif
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
#undef arg
Modified: branches/release/boost/archive/iterators/base64_from_binary.hpp
==============================================================================
--- branches/release/boost/archive/iterators/base64_from_binary.hpp (original)
+++ branches/release/boost/archive/iterators/base64_from_binary.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -18,7 +18,14 @@
#include <cassert>
+#include <cstddef> // size_t
#include <boost/config.hpp> // for BOOST_DEDUCED_TYPENAME
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{
+ using ::size_t;
+} // namespace std
+#endif
+
#include <boost/serialization/pfto.hpp>
#include <boost/iterator/transform_iterator.hpp>
@@ -43,7 +50,7 @@
"0123456789"
"+/";
assert(t < 64);
- return lookup_table[t];
+ return lookup_table[static_cast<size_t>(t)];
}
};
Modified: branches/release/boost/serialization/export.hpp
==============================================================================
--- branches/release/boost/serialization/export.hpp (original)
+++ branches/release/boost/serialization/export.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -147,21 +147,28 @@
};
template<typename T>
-class init_guid {
- static ::boost::archive::detail::guid_initializer<T> const
- & guid_initializer;
-};
+struct init_guid;
} // namespace detail
} // namespace archive
} // namespace boost
-#define BOOST_CLASS_EXPORT_GUID(T, K) \
- ::boost::archive::detail::guid_initializer< T > const & \
- ::boost::archive::detail::init_guid<T>::guid_initializer = \
- ::boost::serialization::singleton< \
- ::boost::archive::detail::guid_initializer< T > \
- >::get_mutable_instance().export_guid(K); \
+#define BOOST_CLASS_EXPORT_GUID(T, K) \
+ namespace boost { \
+ namespace archive { \
+ namespace detail { \
+ template<> \
+ struct init_guid< T > { \
+ static ::boost::archive::detail::guid_initializer< T > const \
+ & guid_initializer; \
+ }; \
+ }}} \
+ ::boost::archive::detail::guid_initializer< T > const & \
+ ::boost::archive::detail::init_guid< T >::guid_initializer = \
+ ::boost::serialization::singleton< \
+ ::boost::archive::detail::guid_initializer< T > \
+ >::get_mutable_instance().export_guid(K); \
+/**/
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
Modified: branches/release/boost/serialization/extended_type_info_typeid.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info_typeid.hpp (original)
+++ branches/release/boost/serialization/extended_type_info_typeid.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -112,7 +112,7 @@
return NULL;
}
}
- void destroy(void const * const p) const {
+ void destroy(void const * const /* p */) const {
// the only current usage of extended type info is in the
// serialization library. The statement below requires
// that destructor of type T be public and this creates
Modified: branches/release/boost/serialization/optional.hpp
==============================================================================
--- branches/release/boost/serialization/optional.hpp (original)
+++ branches/release/boost/serialization/optional.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -39,7 +39,7 @@
if (tflag){
if(3 < ar.get_library_version()){
const int v = version<T>::value;
- ar << make_nvp("item_version", v);
+ ar << boost::serialization::make_nvp("item_version", v);
}
ar << boost::serialization::make_nvp("value", *t);
}
@@ -56,7 +56,7 @@
if (tflag){
unsigned int v = 0;
if(3 < ar.get_library_version()){
- ar >> make_nvp("item_version", v);
+ ar >> boost::serialization::make_nvp("item_version", v);
}
detail::stack_construct<Archive, T> aux(ar, v);
ar >> boost::serialization::make_nvp("value", aux.reference());
Modified: branches/release/boost/serialization/shared_ptr_132.hpp
==============================================================================
--- branches/release/boost/serialization/shared_ptr_132.hpp (original)
+++ branches/release/boost/serialization/shared_ptr_132.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -209,7 +209,7 @@
boost::checked_deleter< T > \
> __shared_ptr_ ## T; \
BOOST_CLASS_EXPORT_GUID(__shared_ptr_ ## T, "__shared_ptr_" K) \
- BOOST_CLASS_EXPORT_GUID_1(T, K) \
+ BOOST_CLASS_EXPORT_GUID(T, K) \
/**/
#define BOOST_SHARED_POINTER_EXPORT(T) \
Modified: branches/release/boost/serialization/slist.hpp
==============================================================================
--- branches/release/boost/serialization/slist.hpp (original)
+++ branches/release/boost/serialization/slist.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -62,7 +62,7 @@
return;
unsigned int v;
if(3 < ar.get_library_version()){
- ar >> make_nvp("item_version", v);
+ ar >> boost::serialization::make_nvp("item_version", v);
}
boost::serialization::detail::stack_construct<Archive, U> u(ar, v);
ar >> boost::serialization::make_nvp("item", u.reference());
Modified: branches/release/boost/serialization/vector.hpp
==============================================================================
--- branches/release/boost/serialization/vector.hpp (original)
+++ branches/release/boost/serialization/vector.hpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -116,7 +116,11 @@
const std::vector<U, Allocator> &t,
const unsigned int file_version
){
- save(ar,t,file_version, BOOST_DEDUCED_TYPENAME use_array_optimization<Archive>::template apply<U>::type());
+ typedef BOOST_DEDUCED_TYPENAME
+ boost::serialization::use_array_optimization<Archive>::template apply<
+ BOOST_DEDUCED_TYPENAME remove_const<U>::type
+ >::type use_optimized;
+ save(ar,t,file_version, use_optimized());
}
template<class Archive, class U, class Allocator>
@@ -125,7 +129,11 @@
std::vector<U, Allocator> &t,
const unsigned int file_version
){
- load(ar,t,file_version, BOOST_DEDUCED_TYPENAME use_array_optimization<Archive>::template apply<U>::type());
+ typedef BOOST_DEDUCED_TYPENAME
+ boost::serialization::use_array_optimization<Archive>::template apply<
+ BOOST_DEDUCED_TYPENAME remove_const<U>::type
+ >::type use_optimized;
+ load(ar,t,file_version, use_optimized());
}
// split non-intrusive serialization function member into separate
Modified: branches/release/libs/serialization/src/basic_iarchive.cpp
==============================================================================
--- branches/release/libs/serialization/src/basic_iarchive.cpp (original)
+++ branches/release/libs/serialization/src/basic_iarchive.cpp 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -222,7 +222,7 @@
inline void
basic_iarchive_impl::reset_object_address(
const void * new_address,
- const void *old_address
+ const void * old_address
){
// this code handles a couple of situations.
// a) where reset_object_address is applied to an untracked object.
Modified: branches/release/libs/serialization/vc7ide/BoostSerializationLibrary.sln
==============================================================================
--- branches/release/libs/serialization/vc7ide/BoostSerializationLibrary.sln (original)
+++ branches/release/libs/serialization/vc7ide/BoostSerializationLibrary.sln 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -2188,8 +2188,8 @@
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static.Build.0 = Debug runtime-static|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static binary_archive.ActiveCfg = Debug runtime-static threading-multi|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static binary_archive.Build.0 = Debug runtime-static threading-multi|Win32
- {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.ActiveCfg = Debug runtime-static threading-multi|Win32
- {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.Build.0 = Debug runtime-static threading-multi|Win32
+ {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.ActiveCfg = Debug runtime-static text_archive|Win32
+ {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.Build.0 = Debug runtime-static text_archive|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_warchive.ActiveCfg = Debug runtime-static threading-multi|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_warchive.Build.0 = Debug runtime-static threading-multi|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static threading-multi.ActiveCfg = Debug runtime-static threading-multi|Win32
@@ -6556,8 +6556,8 @@
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static.Build.0 = Debug runtime-static|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static binary_archive.ActiveCfg = Debug runtime-static threading-multi|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static binary_archive.Build.0 = Debug runtime-static threading-multi|Win32
- {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.ActiveCfg = Debug runtime-static threading-multi|Win32
- {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.Build.0 = Debug runtime-static threading-multi|Win32
+ {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.ActiveCfg = Debug runtime-static text_archive|Win32
+ {A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_archive.Build.0 = Debug runtime-static text_archive|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_warchive.ActiveCfg = Debug runtime-static threading-multi|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static text_warchive.Build.0 = Debug runtime-static threading-multi|Win32
{A7D4CC95-F2AC-11D6-9E47-525400E2CF85}.Debug runtime-static threading-multi.ActiveCfg = Debug runtime-static threading-multi|Win32
Modified: branches/release/libs/serialization/vc7ide/test_no_rtti.vcproj
==============================================================================
--- branches/release/libs/serialization/vc7ide/test_no_rtti.vcproj (original)
+++ branches/release/libs/serialization/vc7ide/test_no_rtti.vcproj 2009-01-16 16:11:57 EST (Fri, 16 Jan 2009)
@@ -1710,6 +1710,24 @@
</References>
<Files>
<File
+ RelativePath="..\test\polymorphic_base.cpp">
+ </File>
+ <File
+ RelativePath="..\test\polymorphic_base.hpp">
+ </File>
+ <File
+ RelativePath="..\test\polymorphic_derived1.cpp">
+ </File>
+ <File
+ RelativePath="..\test\polymorphic_derived1.hpp">
+ </File>
+ <File
+ RelativePath="..\test\polymorphic_derived2.cpp">
+ </File>
+ <File
+ RelativePath="..\test\polymorphic_derived2.hpp">
+ </File>
+ <File
RelativePath="..\test\test_no_rtti.cpp">
</File>
</Files>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk