|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55351 - in branches/release/boost/archive: . detail impl
From: ramey_at_[hidden]
Date: 2009-08-01 19:32:42
Author: ramey
Date: 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
New Revision: 55351
URL: http://svn.boost.org/trac/boost/changeset/55351
Log:
Merge trunk to release
Added:
branches/release/boost/archive/detail/archive_serializer_map.hpp
- copied unchanged from r55347, /trunk/boost/archive/detail/archive_serializer_map.hpp
branches/release/boost/archive/impl/archive_serializer_map.ipp
- copied unchanged from r55347, /trunk/boost/archive/impl/archive_serializer_map.ipp
Removed:
branches/release/boost/archive/detail/archive_pointer_iserializer.hpp
branches/release/boost/archive/detail/archive_pointer_oserializer.hpp
branches/release/boost/archive/impl/archive_pointer_iserializer.ipp
branches/release/boost/archive/impl/archive_pointer_oserializer.ipp
Properties modified:
branches/release/boost/archive/ (props changed)
Text files modified:
branches/release/boost/archive/archive_exception.hpp | 17 ++++++---
branches/release/boost/archive/basic_binary_oarchive.hpp | 19 ++++++++--
branches/release/boost/archive/binary_iarchive.hpp | 1
branches/release/boost/archive/binary_oarchive.hpp | 1
branches/release/boost/archive/binary_wiarchive.hpp | 1
branches/release/boost/archive/binary_woarchive.hpp | 1
branches/release/boost/archive/detail/basic_iarchive.hpp | 16 ++++-----
branches/release/boost/archive/detail/basic_serializer.hpp | 15 +++++--
branches/release/boost/archive/detail/basic_serializer_map.hpp | 44 ++++++++++++------------
branches/release/boost/archive/detail/common_iarchive.hpp | 15 ++++++-
branches/release/boost/archive/detail/common_oarchive.hpp | 2 -
branches/release/boost/archive/detail/iserializer.hpp | 42 +++++++++++++++---------
branches/release/boost/archive/detail/oserializer.hpp | 58 +++++++++++++++++---------------
branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp | 7 +--
branches/release/boost/archive/detail/register_archive.hpp | 3 -
branches/release/boost/archive/impl/basic_text_iarchive.ipp | 1
branches/release/boost/archive/polymorphic_iarchive.hpp | 5 --
branches/release/boost/archive/polymorphic_text_wiarchive.hpp | 12 +++++-
branches/release/boost/archive/polymorphic_xml_wiarchive.hpp | 12 +++++-
branches/release/boost/archive/shared_ptr_helper.hpp | 69 ++++++++++++++++++++++++---------------
branches/release/boost/archive/text_iarchive.hpp | 3 +
branches/release/boost/archive/text_oarchive.hpp | 1
branches/release/boost/archive/text_wiarchive.hpp | 1
branches/release/boost/archive/text_woarchive.hpp | 1
branches/release/boost/archive/xml_iarchive.hpp | 1
branches/release/boost/archive/xml_oarchive.hpp | 1
branches/release/boost/archive/xml_wiarchive.hpp | 1
branches/release/boost/archive/xml_woarchive.hpp | 1
28 files changed, 209 insertions(+), 142 deletions(-)
Modified: branches/release/boost/archive/archive_exception.hpp
==============================================================================
--- branches/release/boost/archive/archive_exception.hpp (original)
+++ branches/release/boost/archive/archive_exception.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -39,11 +39,10 @@
unsupported_version,// archive created with library version
// subsequent to this one
pointer_conflict, // an attempt has been made to directly
- // serialization::detail an object
- // after having already serialzed the same
- // object through a pointer. Were this permited,
- // it the archive load would result in the
- // creation of an extra copy of the obect.
+ // serialize an object which has
+ // already been serialzed through a pointer.
+ // Were this permited, the archive load would result
+ // in the creation of an extra copy of the obect.
incompatible_native_format, // attempt to read native binary format
// on incompatible platform
array_size_too_short,// array being loaded doesn't fit in array allocated
@@ -53,9 +52,11 @@
// to insert virus via buffer overrun method.
unregistered_cast, // base - derived relationship not registered with
// void_cast_register
- unsupported_class_version // type saved with a version # greater than the
+ unsupported_class_version, // type saved with a version # greater than the
// one used by the program. This indicates that the proggram
// needs to be rebuilt.
+ inconsistent_pointer_serialization // an object as been serialized
+ // more than once through pointers of different types.
} exception_code;
exception_code code;
archive_exception(exception_code c) :
@@ -103,6 +104,10 @@
// was sliced by passing by value in catch
msg = "unknown derived exception";
break;
+ case inconsistent_pointer_serialization:
+ // same object saved through different kinds of pointers
+ msg = "inconsistent_pointer_serialization";
+ break;
default:
assert(false);
break;
Modified: branches/release/boost/archive/basic_binary_oarchive.hpp
==============================================================================
--- branches/release/boost/archive/basic_binary_oarchive.hpp (original)
+++ branches/release/boost/archive/basic_binary_oarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -23,6 +23,10 @@
// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON
+#include <cassert>
+#include <boost/integer.hpp>
+#include <boost/integer_traits.hpp>
+
#include <boost/config.hpp>
#include <boost/serialization/pfto.hpp>
@@ -69,27 +73,32 @@
void save_override(const version_type & t, int){
// upto 255 versions
// note:t.t resolves borland ambguity
- const unsigned char x = t.t;
+ assert(t.t <= boost::integer_traits<unsigned char>::const_max);
+ const unsigned char x = static_cast<const unsigned char>(t.t);
* this->This() << x;
}
void save_override(const class_id_type & t, int){
// upto 32K classes
- const int_least16_t x = t.t;
+ assert(t.t <= boost::integer_traits<boost::int_least16_t>::const_max);
+ const boost::int_least16_t x = static_cast<const boost::int_least16_t>(t.t);
* this->This() << x;
}
void save_override(const class_id_reference_type & t, int){
// upto 32K classes
- const int_least16_t x = t.t;
+ assert(t.t <= boost::integer_traits<boost::uint_least32_t>::const_max);
+ const boost::uint_least16_t x = t.t;
* this->This() << x;
}
void save_override(const object_id_type & t, int){
// upto 2G objects
- const uint_least32_t x = t.t;
+ assert(t.t <= boost::integer_traits<boost::uint_least32_t>::const_max);
+ const boost::uint_least32_t x = t.t;
* this->This() << x;
}
void save_override(const object_reference_type & t, int){
// upto 2G objects
- uint_least32_t x = t.t;
+ assert(t.t <= boost::integer_traits<boost::uint_least32_t>::const_max);
+ const boost::uint_least32_t x = t.t;
* this->This() << x;
}
void save_override(const tracking_type & t, int){
Modified: branches/release/boost/archive/binary_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/binary_iarchive.hpp (original)
+++ branches/release/boost/archive/binary_iarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -18,6 +18,7 @@
#include <istream>
#include <boost/archive/binary_iarchive_impl.hpp>
+#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace archive {
Modified: branches/release/boost/archive/binary_oarchive.hpp
==============================================================================
--- branches/release/boost/archive/binary_oarchive.hpp (original)
+++ branches/release/boost/archive/binary_oarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -18,6 +18,7 @@
#include <ostream>
#include <boost/archive/binary_oarchive_impl.hpp>
+#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace archive {
Modified: branches/release/boost/archive/binary_wiarchive.hpp
==============================================================================
--- branches/release/boost/archive/binary_wiarchive.hpp (original)
+++ branches/release/boost/archive/binary_wiarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -23,6 +23,7 @@
#include <istream> // wistream
#include <boost/archive/binary_iarchive_impl.hpp>
+#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace archive {
Modified: branches/release/boost/archive/binary_woarchive.hpp
==============================================================================
--- branches/release/boost/archive/binary_woarchive.hpp (original)
+++ branches/release/boost/archive/binary_woarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -23,6 +23,7 @@
#include <ostream>
#include <boost/archive/binary_oarchive_impl.hpp>
+#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace archive {
Deleted: branches/release/boost/archive/detail/archive_pointer_iserializer.hpp
==============================================================================
--- branches/release/boost/archive/detail/archive_pointer_iserializer.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
+++ (empty file)
@@ -1,94 +0,0 @@
-#ifndef BOOST_ARCHIVE_ARCHIVE_POINTER_ISERIALIZER_POINTER_HPP
-#define BOOST_ARCHIVE_ARCHIVE_POINTER_ISERIALIZER_POINTER_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
-// archive_pointer_iserializer.hpp
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#include <cassert>
-#include <cstddef> // NULL
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#include <boost/archive/detail/basic_serializer.hpp>
-#include <boost/archive/detail/basic_pointer_iserializer.hpp>
-
-#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
-
-namespace boost {
-
-namespace serialization {
- class extended_type_info;
-} // namespace serialization
-
-namespace archive {
-namespace detail {
-
-class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_iarchive;
-
-template<class Archive>
-class archive_pointer_iserializer :
- public basic_pointer_iserializer {
-protected:
- explicit BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
- archive_pointer_iserializer(
- const boost::serialization::extended_type_info & eti
- );
- BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
- // account for bogus gcc warning
- #if defined(__GNUC__)
- virtual
- #endif
- ~archive_pointer_iserializer();
-public:
- virtual const basic_iserializer & get_basic_serializer() const
- // mscvc 6.0 requires template functions to be implemented. For this
- // reason we can't make abstract.
- #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || defined(__MWERKS__)
- {
- assert(false);
- return *static_cast<const basic_iserializer *>(NULL);
- }
- #else
- = 0;
- #endif
- virtual void load_object_ptr(
- basic_iarchive & ar,
- void * & x,
- const unsigned int file_version
- ) const
- #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || defined(__MWERKS__)
- {
- assert(false);
- }
- #else
- = 0;
- #endif
- // return the type_extended load pointer corresponding to a given
- // type_info. returns NULL if there is no such instance. This
- // would indicate that the no object of the specified type was loaded
- // any where in the code.
- static BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_iserializer *)
- find(
- const boost::serialization::extended_type_info & eti
- );
-};
-
-} // namespace detail
-} // namespace archive
-} // namespace boost
-
-#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
-
-#endif // BOOST_ARCHIVE_ARCHIVE_POINTER_ISERIALIZER_POINTER_HPP
Deleted: branches/release/boost/archive/detail/archive_pointer_oserializer.hpp
==============================================================================
--- branches/release/boost/archive/detail/archive_pointer_oserializer.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
+++ (empty file)
@@ -1,66 +0,0 @@
-#ifndef BOOST_ARCHIVE_ARCHIVE_POINTER_OSERIALIZER_POINTER_HPP
-#define BOOST_ARCHIVE_ARCHIVE_POINTER_OSERIALIZER_POINTER_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
-// archive_pointer_oserializer.hpp: extenstion of type_info required for
-// serialization.
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#include <boost/config.hpp>
-#include <boost/archive/detail/basic_serializer.hpp>
-#include <boost/archive/detail/basic_pointer_oserializer.hpp>
-
-#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
-
-namespace boost {
-
-namespace serialization {
- class extended_type_info;
-} // namespace serialization
-
-namespace archive {
-namespace detail {
-
-template<class Archive>
-class archive_pointer_oserializer :
- public basic_pointer_oserializer {
-protected:
- explicit BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
- archive_pointer_oserializer(
- const boost::serialization::extended_type_info & eti
- );
- BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
- // account for bogus gcc warning
- #if defined(__GNUC__)
- virtual
- #endif
- ~archive_pointer_oserializer();
-public:
- // return the type_extended save pointer corresponding to a give
- // type_info. returns NULL, if there is no such instance. This
- // would indicate that the no object of the specified type was saved
- // any where in the code.
- static BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_oserializer *)
- find(
- const boost::serialization::extended_type_info & eti
- );
-};
-
-} // namespace detail
-} // namespace archive
-} // namespace boost
-
-#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
-
-#endif // BOOST_ARCHIVE_ARCHIVE_POINTER_OSERIALIZER_POINTER_HPP
Modified: branches/release/boost/archive/detail/basic_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/detail/basic_iarchive.hpp (original)
+++ branches/release/boost/archive/detail/basic_iarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -53,6 +53,9 @@
virtual void vload(class_id_optional_type &t) = 0;
virtual void vload(class_name_type &t) = 0;
virtual void vload(tracking_type &t) = 0;
+
+ virtual const basic_pointer_iserializer *
+ find(const boost::serialization::extended_type_info & eti) const = 0;
protected:
basic_iarchive(unsigned int flags);
// account for bogus gcc warning
@@ -64,21 +67,16 @@
// note: NOT part of the public API.
void next_object_pointer(void *t);
void register_basic_serializer(
- const /* BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) */ basic_iserializer & bis
+ const basic_iserializer & bis
);
void load_object(
void *t,
- const /* BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) */ basic_iserializer & bis
+ const basic_iserializer & bis
);
- const /* BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) */ basic_pointer_iserializer *
+ const basic_pointer_iserializer *
load_pointer(
void * & t,
- const /* BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) */
- basic_pointer_iserializer * bpis_ptr,
- const /* BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) */
- basic_pointer_iserializer * (*finder)(
- const boost::serialization::extended_type_info & eti
- )
+ const basic_pointer_iserializer * bpis_ptr
);
// real public API starts here
void
Modified: branches/release/boost/archive/detail/basic_serializer.hpp
==============================================================================
--- branches/release/boost/archive/detail/basic_serializer.hpp (original)
+++ branches/release/boost/archive/detail/basic_serializer.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -27,26 +27,31 @@
namespace archive {
namespace detail {
-class basic_serializer : private boost::noncopyable
+class basic_serializer :
+ private boost::noncopyable
{
- const boost::serialization::extended_type_info & m_eti;
+ const boost::serialization::extended_type_info * m_eti;
protected:
explicit basic_serializer(
const boost::serialization::extended_type_info & eti
) :
- m_eti(eti)
+ m_eti(& eti)
{
assert(NULL != & eti);
}
public:
const boost::serialization::extended_type_info & get_eti() const {
- return m_eti;
+ return * m_eti;
}
};
inline bool
operator<(const basic_serializer & lhs, const basic_serializer & rhs) {
- return & lhs.get_eti() < & rhs.get_eti();
+ // can't compare address since there can be multiple eti records
+ // for the same type in different execution modules (that is, DLLS)
+ // leave this here as a reminder not to do this!
+ // return & lhs.get_eti() < & rhs.get_eti();
+ return lhs.get_eti() < rhs.get_eti();
}
class basic_serializer_arg : public basic_serializer {
Modified: branches/release/boost/archive/detail/basic_serializer_map.hpp
==============================================================================
--- branches/release/boost/archive/detail/basic_serializer_map.hpp (original)
+++ branches/release/boost/archive/detail/basic_serializer_map.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -1,5 +1,5 @@
-#ifndef BOOST_TYPEINFO_EXTENDED_MAP_HPP
-#define BOOST_TYPEINFO_EXTENDED_MAP_HPP
+#ifndef BOOST_SERIALIZER_MAP_HPP
+#define BOOST_SERIALIZER_MAP_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
@@ -16,44 +16,44 @@
// See http://www.boost.org for updates, documentation, and revision history.
-#include <set>
+#include <list>
#include <boost/config.hpp>
-#include <boost/utility.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
-
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+#include <boost/utility.hpp>
+
namespace boost {
namespace serialization {
class extended_type_info;
}
namespace archive {
-namespace detail {
-
-class BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) basic_serializer;
+namespace detail {
-bool operator<(const basic_serializer & lhs, const basic_serializer & rhs);
+class basic_serializer;
-struct BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) type_info_pointer_compare
+class BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY()) basic_serializer_map : public
+ boost::noncopyable
{
- bool operator()(
- const basic_serializer * lhs, const basic_serializer * rhs
- ) const {
- return *lhs < *rhs;
- }
+ typedef std::list<const basic_serializer *> map_type;
+ map_type m_map;
+public:
+ void insert(const basic_serializer * bs);
+ void erase(const basic_serializer * bs);
+ const basic_serializer * find(
+ const boost::serialization::extended_type_info & type_
+ ) const;
+private:
+ // cw 8.3 requires this
+ basic_serializer_map& operator=(basic_serializer_map const&);
};
-typedef BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) std::set<
- const basic_serializer *,
- type_info_pointer_compare
-> basic_serializer_map;
-
} // namespace detail
} // namespace archive
} // namespace boost
-#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+#include <boost/archive/detail/abi_suffix.hpp> // must be the last header
-#endif // BOOST_TYPEINFO_EXTENDED_MAP_HPP
+#endif // BOOST_SERIALIZER_MAP_HPP
Modified: branches/release/boost/archive/detail/common_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/detail/common_iarchive.hpp (original)
+++ branches/release/boost/archive/detail/common_iarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -17,15 +17,17 @@
// See http://www.boost.org for updates, documentation, and revision history.
#include <boost/archive/detail/basic_iarchive.hpp>
+#include <boost/archive/detail/basic_pointer_iserializer.hpp>
#include <boost/archive/detail/interface_iarchive.hpp>
-#include <boost/archive/detail/iserializer.hpp>
-#include <boost/archive/detail/register_archive.hpp>
-#include <boost/serialization/pfto.hpp>
+#include <boost/archive/detail/archive_serializer_map.hpp>
+#include <boost/serialization/singleton.hpp>
namespace boost {
namespace archive {
namespace detail {
+class extended_type_info;
+
// note: referred to as Curiously Recurring Template Patter (CRTP)
template<class Archive>
class common_iarchive :
@@ -67,6 +69,13 @@
basic_iarchive(flags),
interface_iarchive<Archive>()
{}
+public:
+ virtual const basic_pointer_iserializer *
+ find(const boost::serialization::extended_type_info & eti) const {
+ return static_cast<const basic_pointer_iserializer *>(
+ archive_serializer_map<Archive>::find(eti)
+ );
+ }
};
} // namespace detail
Modified: branches/release/boost/archive/detail/common_oarchive.hpp
==============================================================================
--- branches/release/boost/archive/detail/common_oarchive.hpp (original)
+++ branches/release/boost/archive/detail/common_oarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -18,8 +18,6 @@
#include <boost/archive/detail/basic_oarchive.hpp>
#include <boost/archive/detail/interface_oarchive.hpp>
-#include <boost/archive/detail/oserializer.hpp>
-#include <boost/archive/detail/register_archive.hpp>
namespace boost {
namespace archive {
Modified: branches/release/boost/archive/detail/iserializer.hpp
==============================================================================
--- branches/release/boost/archive/detail/iserializer.hpp (original)
+++ branches/release/boost/archive/detail/iserializer.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -47,14 +47,14 @@
#include <boost/serialization/assume_abstract.hpp>
#include <boost/type_traits/is_polymorphic.hpp>
-#define NO_HAS_NEW_OPERATOR ( \
+#define DONT_USE_HAS_NEW_OPERATOR ( \
defined(__BORLANDC__) \
|| defined(__IBMCPP__) \
|| defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) \
|| defined(__SUNPRO_CC) && (__SUBPRO_CC < 0x590) \
)
-#if ! NO_USE_HAS_NEW_OPERATOR
+#if ! DONT_USE_HAS_NEW_OPERATOR
#include <boost/type_traits/has_new_operator.hpp>
#endif
@@ -71,13 +71,14 @@
#include <boost/mpl/not.hpp>
#include <boost/mpl/bool.hpp>
- #ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
- #include <boost/serialization/extended_type_info_typeid.hpp>
- #endif
+#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
+ #include <boost/serialization/extended_type_info_typeid.hpp>
+#endif
// the following is need only for dynamic cast of polymorphic pointers
#include <boost/archive/detail/basic_iarchive.hpp>
#include <boost/archive/detail/basic_iserializer.hpp>
-#include <boost/archive/detail/archive_pointer_iserializer.hpp>
+#include <boost/archive/detail/basic_pointer_iserializer.hpp>
+#include <boost/archive/detail/archive_serializer_map.hpp>
#include <boost/archive/archive_exception.hpp>
#include <boost/serialization/serialization.hpp>
@@ -118,15 +119,15 @@
virtual void destroy(/*const*/ void *address) const {
boost::serialization::access::destroy(static_cast<T *>(address));
}
- // private constructor to inhibit any existence other than the
- // static one
-public:
+protected:
+ // protected constructor since it's always created by singleton
explicit iserializer() :
basic_iserializer(
boost::serialization::type_info_implementation<T>::type
::get_const_instance()
)
{}
+public:
virtual BOOST_DLLEXPORT void load_object_data(
basic_iarchive & ar,
void *x,
@@ -174,8 +175,8 @@
}
template<class Archive, class T>
-class pointer_iserializer
- : public archive_pointer_iserializer<Archive>
+class pointer_iserializer :
+ public basic_pointer_iserializer
{
private:
virtual const basic_iserializer & get_basic_serializer() const {
@@ -188,8 +189,10 @@
void * & x,
const unsigned int file_version
) const BOOST_USED;
-public:
+protected:
+ // this should alway be a singleton so make the constructor protected
pointer_iserializer();
+ ~pointer_iserializer();
};
// note trick to be sure that operator new is using class specific
@@ -207,7 +210,7 @@
struct heap_allocator
{
// boost::has_new_operator<T> doesn't work on these compilers
- #if NO_USE_HAS_NEW_OPERATOR
+ #if DONT_USE_HAS_NEW_OPERATOR
// This doesn't handle operator new overload for class T
static T * invoke(){
return static_cast<T *>(operator new(sizeof(T)));
@@ -260,6 +263,8 @@
T* m_p;
};
+// note: BOOST_DLLEXPORT is so that code for polymorphic class
+// serialized only through base class won't get optimized out
template<class Archive, class T>
BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
basic_iarchive & ar,
@@ -302,7 +307,7 @@
template<class Archive, class T>
pointer_iserializer<Archive, T>::pointer_iserializer() :
- archive_pointer_iserializer<Archive>(
+ basic_pointer_iserializer(
boost::serialization::type_info_implementation<T>::type
::get_const_instance()
)
@@ -310,6 +315,12 @@
boost::serialization::singleton<
iserializer<Archive, T>
>::get_mutable_instance().set_bpis(this);
+ archive_serializer_map<Archive>::insert(this);
+}
+
+template<class Archive, class T>
+pointer_iserializer<Archive, T>::~pointer_iserializer(){
+ archive_serializer_map<Archive>::erase(this);
}
template<class Archive, class T>
@@ -463,8 +474,7 @@
const basic_pointer_iserializer * bpis_ptr = register_type(ar, *t);
const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer(
* reinterpret_cast<void **>(&t),
- bpis_ptr,
- archive_pointer_iserializer<Archive>::find
+ bpis_ptr
);
// if the pointer isn't that of the base class
if(newbpis_ptr != bpis_ptr){
Modified: branches/release/boost/archive/detail/oserializer.hpp
==============================================================================
--- branches/release/boost/archive/detail/oserializer.hpp (original)
+++ branches/release/boost/archive/detail/oserializer.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -34,31 +34,29 @@
#include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_enum.hpp>
-//#include <boost/type_traits/is_volatile.hpp>
#include <boost/type_traits/is_const.hpp>
-//#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/is_polymorphic.hpp>
#include <boost/type_traits/remove_extent.hpp>
#include <boost/serialization/assume_abstract.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/and.hpp>
-//#include <boost/mpl/less.hpp>
#include <boost/mpl/greater_equal.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/identity.hpp>
-//#include <boost/mpl/list.hpp>
-//#include <boost/mpl/empty.hpp>
#include <boost/mpl/not.hpp>
- #ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
- #include <boost/serialization/extended_type_info_typeid.hpp>
- #endif
+#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
+ #include <boost/serialization/extended_type_info_typeid.hpp>
+#endif
+
// the following is need only for dynamic cast of polymorphic pointers
#include <boost/archive/detail/basic_oarchive.hpp>
#include <boost/archive/detail/basic_oserializer.hpp>
-#include <boost/archive/detail/archive_pointer_oserializer.hpp>
+#include <boost/archive/detail/basic_pointer_oserializer.hpp>
+#include <boost/archive/detail/archive_serializer_map.hpp>
+#include <boost/archive/archive_exception.hpp>
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/version.hpp>
@@ -71,8 +69,6 @@
#include <boost/serialization/collection_size_type.hpp>
#include <boost/serialization/singleton.hpp>
-#include <boost/archive/archive_exception.hpp>
-
namespace boost {
namespace serialization {
@@ -149,28 +145,26 @@
}
template<class Archive, class T>
-class pointer_oserializer
- : public archive_pointer_oserializer<Archive>
+class pointer_oserializer :
+ public basic_pointer_oserializer
{
- const basic_oserializer & get_basic_serializer() const;
private:
+ const basic_oserializer &
+ get_basic_serializer() const {
+ return boost::serialization::singleton<
+ oserializer<Archive, T>
+ >::get_const_instance();
+ }
virtual BOOST_DLLEXPORT void save_object_ptr(
basic_oarchive & ar,
const void * x
) const BOOST_USED;
public:
- explicit BOOST_DLLEXPORT pointer_oserializer() BOOST_USED;
+ pointer_oserializer();
+ ~pointer_oserializer();
};
template<class Archive, class T>
-const basic_oserializer &
-pointer_oserializer<Archive, T>::get_basic_serializer() const {
- return boost::serialization::singleton<
- oserializer<Archive, T>
- >::get_const_instance();
-}
-
-template<class Archive, class T>
BOOST_DLLEXPORT void pointer_oserializer<Archive, T>::save_object_ptr(
basic_oarchive & ar,
const void * x
@@ -191,8 +185,8 @@
}
template<class Archive, class T>
-BOOST_DLLEXPORT pointer_oserializer<Archive, T>::pointer_oserializer() :
- archive_pointer_oserializer<Archive>(
+pointer_oserializer<Archive, T>::pointer_oserializer() :
+ basic_pointer_oserializer(
boost::serialization::type_info_implementation<T>::type
::get_const_instance()
)
@@ -201,6 +195,12 @@
boost::serialization::singleton<
oserializer<Archive, T>
>::get_mutable_instance().set_bpos(this);
+ archive_serializer_map<Archive>::insert(this);
+}
+
+template<class Archive, class T>
+pointer_oserializer<Archive, T>::~pointer_oserializer(){
+ archive_serializer_map<Archive>::erase(this);
}
template<class Archive, class T>
@@ -398,8 +398,12 @@
// since true_type is valid, and this only gets made if the
// pointer oserializer object has been created, this should never
// fail
- const basic_pointer_oserializer * bpos
- = archive_pointer_oserializer<Archive>::find(* true_type);
+ const basic_pointer_oserializer * bpos
+ = static_cast<const basic_pointer_oserializer *>(
+ boost::serialization::singleton<
+ archive_serializer_map<Archive>
+ >::get_const_instance().find(*true_type)
+ );
assert(NULL != bpos);
if(NULL == bpos)
boost::serialization::throw_exception(
Modified: branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp
==============================================================================
--- branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp (original)
+++ branches/release/boost/archive/detail/polymorphic_iarchive_route.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -60,12 +60,9 @@
}
virtual const basic_pointer_iserializer * load_pointer(
void * & t,
- const basic_pointer_iserializer * bpis_ptr,
- const basic_pointer_iserializer * (*finder)(
- const boost::serialization::extended_type_info & type
- )
+ const basic_pointer_iserializer * bpis_ptr
){
- return ArchiveImplementation::load_pointer(t, bpis_ptr, finder);
+ return ArchiveImplementation::load_pointer(t, bpis_ptr);
}
virtual void set_library_version(unsigned int archive_library_version){
ArchiveImplementation::set_library_version(archive_library_version);
Modified: branches/release/boost/archive/detail/register_archive.hpp
==============================================================================
--- branches/release/boost/archive/detail/register_archive.hpp (original)
+++ branches/release/boost/archive/detail/register_archive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -66,9 +66,6 @@
#else
- // This function gets called, but its only purpose is to participate
- // in overload resolution with the functions declared by
- // BOOST_SERIALIZATION_REGISTER_ARCHIVE, below.
// This function gets called, but its only purpose is to participate
// in overload resolution with the functions declared by
// BOOST_SERIALIZATION_REGISTER_ARCHIVE, below.
Deleted: branches/release/boost/archive/impl/archive_pointer_iserializer.ipp
==============================================================================
--- branches/release/boost/archive/impl/archive_pointer_iserializer.ipp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
+++ (empty file)
@@ -1,87 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// pointer_iserializer.ipp:
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#include <utility>
-#include <cassert>
-#include <cstddef>
-#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
-
-#include <boost/serialization/singleton.hpp>
-#include <boost/archive/detail/basic_serializer_map.hpp>
-#include <boost/archive/detail/archive_pointer_iserializer.hpp>
-
-namespace boost {
-namespace archive {
-namespace detail {
-
-namespace { // anon
- template<class Archive>
- class iserializer_map : public basic_serializer_map
- {
- };
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_iserializer<Archive>::archive_pointer_iserializer(
- const boost::serialization::extended_type_info & eti
-) :
- basic_pointer_iserializer(eti)
-{
- std::pair<BOOST_DEDUCED_TYPENAME iserializer_map<Archive>::iterator, bool> result;
- result = serialization::singleton<
- iserializer_map<Archive>
- >::get_mutable_instance().insert(this);
- assert(result.second);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_iserializer *)
-archive_pointer_iserializer<Archive>::find(
- const boost::serialization::extended_type_info & eti
-){
- const basic_serializer_arg bs(eti);
- BOOST_DEDUCED_TYPENAME iserializer_map<Archive>::const_iterator it;
- it = boost::serialization::singleton<
- iserializer_map<Archive>
- >::get_const_instance().find(& bs);
- assert(
- it
- !=
- boost::serialization::singleton<
- iserializer_map<Archive>
- >::get_const_instance().end()
- );
- return static_cast<const basic_pointer_iserializer *>(*it);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_iserializer<Archive>::~archive_pointer_iserializer(){
- if(! serialization::singleton<
- iserializer_map<Archive>
- >::is_destroyed()
- ){
- std::size_t count;
- count = serialization::singleton<
- iserializer_map<Archive>
- >::get_mutable_instance().erase(this);
- assert(count);
- }
-}
-
-} // namespace detail
-} // namespace archive
-} // namespace boost
Deleted: branches/release/boost/archive/impl/archive_pointer_oserializer.ipp
==============================================================================
--- branches/release/boost/archive/impl/archive_pointer_oserializer.ipp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
+++ (empty file)
@@ -1,87 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// archive_pointer_oserializer.ipp:
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#include <utility>
-#include <cassert>
-
-#include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
-
-#include <boost/archive/detail/archive_pointer_oserializer.hpp>
-#include <boost/archive/detail/basic_serializer_map.hpp>
-#include <boost/serialization/singleton.hpp>
-
-namespace boost {
-namespace archive {
-namespace detail {
-
-namespace { // anon
- template<class Archive>
- class oserializer_map : public basic_serializer_map
- {
- };
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_oserializer<Archive>::archive_pointer_oserializer(
- const boost::serialization::extended_type_info & eti
-) :
- basic_pointer_oserializer(eti)
-{
- std::pair<
- BOOST_DEDUCED_TYPENAME oserializer_map<Archive>::iterator,
- bool
- > result;
- result = serialization::singleton<
- oserializer_map<Archive>
- >::get_mutable_instance().insert(this);
- assert(result.second);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(const basic_pointer_oserializer *)
-archive_pointer_oserializer<Archive>::find(
- const boost::serialization::extended_type_info & eti
-){
- const basic_serializer_arg bs(eti);
- basic_serializer_map::const_iterator it;
- it = boost::serialization::singleton<
- oserializer_map<Archive>
- >::get_const_instance().find(& bs);
- assert(
- it
- !=
- boost::serialization::singleton<
- oserializer_map<Archive>
- >::get_const_instance().end()
- );
- return static_cast<const basic_pointer_oserializer *>(*it);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
-archive_pointer_oserializer<Archive>::~archive_pointer_oserializer(){
- // note: we need to check that the map still exists as we can't depend
- // on static variables being constructed in a specific sequence
- if(! serialization::singleton<
- oserializer_map<Archive>
- >::is_destroyed()
- ){
- unsigned int count;
- count = serialization::singleton<
- oserializer_map<Archive>
- >::get_mutable_instance().erase(this);
- assert(count);
- }
-}
-
-} // namespace detail
-} // namespace archive
-} // namespace boost
Modified: branches/release/boost/archive/impl/basic_text_iarchive.ipp
==============================================================================
--- branches/release/boost/archive/impl/basic_text_iarchive.ipp (original)
+++ branches/release/boost/archive/impl/basic_text_iarchive.ipp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -8,7 +8,6 @@
// See http://www.boost.org for updates, documentation, and revision history.
#include <string>
-#include <cassert>
#include <algorithm>
#include <cstring>
Modified: branches/release/boost/archive/polymorphic_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/polymorphic_iarchive.hpp (original)
+++ branches/release/boost/archive/polymorphic_iarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -159,10 +159,7 @@
) = 0;
virtual const detail::basic_pointer_iserializer * load_pointer(
void * & t,
- const detail::basic_pointer_iserializer * bpis_ptr,
- const detail::basic_pointer_iserializer * (*finder)(
- const boost::serialization::extended_type_info & type
- )
+ const detail::basic_pointer_iserializer * bpis_ptr
) = 0;
};
Modified: branches/release/boost/archive/polymorphic_text_wiarchive.hpp
==============================================================================
--- branches/release/boost/archive/polymorphic_text_wiarchive.hpp (original)
+++ branches/release/boost/archive/polymorphic_text_wiarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -27,9 +27,15 @@
namespace boost {
namespace archive {
-typedef detail::polymorphic_iarchive_route<
- text_wiarchive_impl<naked_text_wiarchive>
-> polymorphic_text_wiarchive;
+class polymorphic_text_wiarchive :
+ public detail::polymorphic_iarchive_route<naked_text_wiarchive>
+{
+public:
+ polymorphic_text_wiarchive(std::wistream & is, unsigned int flags = 0) :
+ detail::polymorphic_iarchive_route<naked_text_wiarchive>(is, flags)
+ {}
+ ~polymorphic_text_wiarchive(){}
+};
} // namespace archive
} // namespace boost
Modified: branches/release/boost/archive/polymorphic_xml_wiarchive.hpp
==============================================================================
--- branches/release/boost/archive/polymorphic_xml_wiarchive.hpp (original)
+++ branches/release/boost/archive/polymorphic_xml_wiarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -27,9 +27,15 @@
namespace boost {
namespace archive {
-typedef detail::polymorphic_iarchive_route<
- xml_wiarchive_impl<naked_xml_wiarchive>
-> polymorphic_xml_wiarchive;
+class polymorphic_xml_wiarchive :
+ public detail::polymorphic_iarchive_route<naked_xml_wiarchive>
+{
+public:
+ polymorphic_xml_wiarchive(std::wistream & is, unsigned int flags = 0) :
+ detail::polymorphic_iarchive_route<naked_xml_wiarchive>(is, flags)
+ {}
+ ~polymorphic_xml_wiarchive(){}
+};
} // namespace archive
} // namespace boost
Modified: branches/release/boost/archive/shared_ptr_helper.hpp
==============================================================================
--- branches/release/boost/archive/shared_ptr_helper.hpp (original)
+++ branches/release/boost/archive/shared_ptr_helper.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -9,7 +9,7 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// shared_ptr_helper.hpp: serialization for boost shared pointer
-// (C) Copyright 2004 Robert Ramey and Martin Ecker
+// (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)
@@ -18,10 +18,12 @@
#include <map>
#include <list>
+#include <utility>
#include <cstddef> // NULL
#include <boost/config.hpp>
#include <boost/shared_ptr.hpp>
+
#include <boost/serialization/type_info_implementation.hpp>
#include <boost/serialization/shared_ptr_132.hpp>
#include <boost/serialization/throw_exception.hpp>
@@ -54,7 +56,10 @@
// a common class for holding various types of shared pointers
class shared_ptr_helper {
- typedef std::map<const void *, shared_ptr<void> > collection_type;
+ typedef std::map<
+ const void *,
+ boost::shared_ptr<const void>
+ > collection_type;
typedef collection_type::const_iterator iterator_type;
// list of shared_pointers create accessable by raw pointer. This
// is used to "match up" shared pointers loaded at different
@@ -74,6 +79,7 @@
);
#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
@@ -83,10 +89,17 @@
// 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<void> > * m_pointers_132;
+// #endif
- // return a void pointer to the most derived type
+public:
template<class T>
- const void * object_identifier(T * t) const {
+ void reset(shared_ptr<T> & s, T * t){
+ if(NULL == t){
+ s.reset();
+ return;
+ }
+ // get pointer to the most derived object. This is effectively
+ // the object identifer
const boost::serialization::extended_type_info * true_type
= boost::serialization::type_info_implementation<T>::type
::get_const_instance().get_derived_extended_type_info(*t);
@@ -94,59 +107,61 @@
// is either registered or exported.
if(NULL == true_type)
boost::serialization::throw_exception(
- boost::archive::archive_exception(
- boost::archive::archive_exception::unregistered_class
- )
+ archive_exception(archive_exception::unregistered_class)
);
const boost::serialization::extended_type_info * this_type
= & boost::serialization::type_info_implementation<T>::type
::get_const_instance();
- const void * vp = void_downcast(
+
+ // get void pointer to the most derived type
+ // this uniquely identifies the object referred to
+ const void * od = void_downcast(
*true_type,
*this_type,
static_cast<const void *>(t)
);
- return vp;
- }
-public:
- template<class T>
- void reset(shared_ptr<T> & s, T * r){
- if(NULL == r){
- s.reset();
- return;
- }
- // get pointer to the most derived object. This is effectively
- // the object identifer
- const void * od = object_identifier(r);
+ // make tracking array if necessary
if(NULL == m_pointers)
m_pointers = new collection_type;
iterator_type it = m_pointers->find(od);
+ // create a new shared pointer to a void
if(it == m_pointers->end()){
- s.reset(r);
- m_pointers->insert(collection_type::value_type(od,s));
- }
- else{
- s = static_pointer_cast<T>((*it).second);
+ s.reset(t);
+ shared_ptr<const void> sp(s, od);
+ m_pointers->insert(collection_type::value_type(od, sp));
+ return;
}
+ t = static_cast<T *>(const_cast<void *>(void_upcast(
+ *true_type,
+ *this_type,
+ ((*it).second.get())
+ )));
+ s = shared_ptr<T>((*it).second, t); // aliasing
}
+// #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
void append(const boost_132::shared_ptr<void> & t){
if(NULL == m_pointers_132)
m_pointers_132 = new std::list<boost_132::shared_ptr<void> >;
m_pointers_132->push_back(t);
}
+// #endif
public:
shared_ptr_helper() :
- m_pointers(NULL),
- m_pointers_132(NULL)
+ m_pointers(NULL)
+ #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
+ , m_pointers_132(NULL)
+ #endif
{}
~shared_ptr_helper(){
if(NULL != m_pointers)
delete m_pointers;
+ #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
if(NULL != m_pointers_132)
delete m_pointers_132;
+ #endif
}
};
Modified: branches/release/boost/archive/text_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/text_iarchive.hpp (original)
+++ branches/release/boost/archive/text_iarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -18,10 +18,11 @@
#include <istream>
+#include <boost/config.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/basic_text_iprimitive.hpp>
#include <boost/archive/basic_text_iarchive.hpp>
-#include <boost/config.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
Modified: branches/release/boost/archive/text_oarchive.hpp
==============================================================================
--- branches/release/boost/archive/text_oarchive.hpp (original)
+++ branches/release/boost/archive/text_oarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -29,6 +29,7 @@
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/basic_text_oprimitive.hpp>
#include <boost/archive/basic_text_oarchive.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
Modified: branches/release/boost/archive/text_wiarchive.hpp
==============================================================================
--- branches/release/boost/archive/text_wiarchive.hpp (original)
+++ branches/release/boost/archive/text_wiarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -26,6 +26,7 @@
#include <boost/archive/detail/auto_link_warchive.hpp>
#include <boost/archive/basic_text_iprimitive.hpp>
#include <boost/archive/basic_text_iarchive.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
Modified: branches/release/boost/archive/text_woarchive.hpp
==============================================================================
--- branches/release/boost/archive/text_woarchive.hpp (original)
+++ branches/release/boost/archive/text_woarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -34,6 +34,7 @@
#include <boost/archive/detail/auto_link_warchive.hpp>
#include <boost/archive/basic_text_oprimitive.hpp>
#include <boost/archive/basic_text_oarchive.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
Modified: branches/release/boost/archive/xml_iarchive.hpp
==============================================================================
--- branches/release/boost/archive/xml_iarchive.hpp (original)
+++ branches/release/boost/archive/xml_iarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -22,6 +22,7 @@
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/basic_text_iprimitive.hpp>
#include <boost/archive/basic_xml_iarchive.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
Modified: branches/release/boost/archive/xml_oarchive.hpp
==============================================================================
--- branches/release/boost/archive/xml_oarchive.hpp (original)
+++ branches/release/boost/archive/xml_oarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -29,6 +29,7 @@
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/basic_text_oprimitive.hpp>
#include <boost/archive/basic_xml_oarchive.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
Modified: branches/release/boost/archive/xml_wiarchive.hpp
==============================================================================
--- branches/release/boost/archive/xml_wiarchive.hpp (original)
+++ branches/release/boost/archive/xml_wiarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -27,6 +27,7 @@
#include <boost/archive/detail/auto_link_warchive.hpp>
#include <boost/archive/basic_text_iprimitive.hpp>
#include <boost/archive/basic_xml_iarchive.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
Modified: branches/release/boost/archive/xml_woarchive.hpp
==============================================================================
--- branches/release/boost/archive/xml_woarchive.hpp (original)
+++ branches/release/boost/archive/xml_woarchive.hpp 2009-08-01 19:32:39 EDT (Sat, 01 Aug 2009)
@@ -33,6 +33,7 @@
#include <boost/archive/detail/auto_link_warchive.hpp>
#include <boost/archive/basic_text_oprimitive.hpp>
#include <boost/archive/basic_xml_oarchive.hpp>
+#include <boost/archive/detail/register_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
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