Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2007-09-27 00:01:57


Author: ramey
Date: 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
New Revision: 39564
URL: http://svn.boost.org/trac/boost/changeset/39564

Log:
improvements to extended type info system - unfortunately, these break the export.
Removed:
   branches/serialization_next_release/boost/boost/archive/detail/known_archive_types.hpp
   branches/serialization_next_release/boost/boost/archive/detail/known_archive_types_fwd.hpp
Text files modified:
   branches/serialization_next_release/boost/boost/archive/basic_archive.hpp | 4 +-
   branches/serialization_next_release/boost/boost/archive/basic_binary_iprimitive.hpp | 29 ++++------------
   branches/serialization_next_release/boost/boost/archive/basic_binary_oprimitive.hpp | 3 +
   branches/serialization_next_release/boost/boost/archive/basic_streambuf_locale_saver.hpp | 3 -
   branches/serialization_next_release/boost/boost/archive/basic_text_iprimitive.hpp | 4 ++
   branches/serialization_next_release/boost/boost/archive/basic_text_oarchive.hpp | 2
   branches/serialization_next_release/boost/boost/archive/basic_text_oprimitive.hpp | 3 +
   branches/serialization_next_release/boost/boost/archive/detail/basic_iarchive.hpp | 3 -
   branches/serialization_next_release/boost/boost/archive/detail/basic_oarchive.hpp | 3 -
   branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_iserializer.hpp | 6 +-
   branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_oserializer.hpp | 6 +-
   branches/serialization_next_release/boost/boost/archive/detail/interface_iarchive.hpp | 6 ---
   branches/serialization_next_release/boost/boost/archive/detail/interface_oarchive.hpp | 7 ---
   branches/serialization_next_release/boost/boost/archive/detail/iserializer.hpp | 51 +++++------------------------
   branches/serialization_next_release/boost/boost/archive/detail/oserializer.hpp | 69 ++++++++++++---------------------------
   branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iarchive.ipp | 1
   branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iprimitive.ipp | 5 ++
   branches/serialization_next_release/boost/boost/archive/impl/basic_binary_oprimitive.ipp | 5 ++
   branches/serialization_next_release/boost/boost/archive/impl/basic_text_iarchive.ipp | 1
   branches/serialization_next_release/boost/boost/archive/impl/basic_text_iprimitive.ipp | 9 ++++
   branches/serialization_next_release/boost/boost/archive/impl/basic_text_oprimitive.ipp | 7 ++++
   branches/serialization_next_release/boost/boost/archive/impl/basic_xml_iarchive.ipp | 1
   branches/serialization_next_release/boost/boost/archive/shared_ptr_helper.hpp | 4 +
   23 files changed, 86 insertions(+), 146 deletions(-)

Modified: branches/serialization_next_release/boost/boost/archive/basic_archive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/basic_archive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/basic_archive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -86,8 +86,8 @@
     no_header = 1, // suppress archive header info
     no_codecvt = 2, // suppress alteration of codecvt facet
     no_xml_tag_checking = 4, // suppress checking of xml tags
- no_tracking = 8 // suppress ALL tracking
-// no_object_creation = 16 // don't create any new objects
+ no_tracking = 8, // suppress ALL tracking
+ flags_last = 8
 };
 
 #define NULL_POINTER_TAG class_id_type(-1)

Modified: branches/serialization_next_release/boost/boost/archive/basic_binary_iprimitive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/basic_binary_iprimitive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/basic_binary_iprimitive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -6,6 +6,10 @@
 # pragma once
 #endif
 
+#if defined(_MSC_VER)
+#pragma warning( disable : 4800 )
+#endif
+
 /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
 // basic_binary_iprimitive.hpp
 //
@@ -72,8 +76,11 @@
     Archive * This(){
         return static_cast<Archive *>(this);
     }
+
+ #ifndef BOOST_NO_STD_LOCALE
     boost::scoped_ptr<std::locale> archive_locale;
     basic_streambuf_locale_saver<Elem, Tr> locale_saver;
+ #endif
 
     // main template for serilization of primitive types
     template<class T>
@@ -132,28 +139,6 @@
     void *address,
     std::size_t count
 ){
-#if 0
- assert(
- static_cast<std::size_t>((std::numeric_limits<std::streamsize>::max)()) >= count
- );
- //if(is.fail())
- // boost::throw_exception(archive_exception(archive_exception::stream_error));
- // note: an optimizer should eliminate the following for char files
- std::size_t s = count / sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
- is.read(
- static_cast<BOOST_DEDUCED_TYPENAME IStream::char_type *>(address),
- s
- );
- // note: an optimizer should eliminate the following for char files
- s = count % sizeof(BOOST_DEDUCED_TYPENAME IStream::char_type);
- if(0 < s){
- if(is.fail())
- boost::throw_exception(archive_exception(archive_exception::stream_error));
- BOOST_DEDUCED_TYPENAME IStream::char_type t;
- is.read(& t, 1);
- std::memcpy(address, &t, s);
- }
-#endif
     // note: an optimizer should eliminate the following for char files
     std::streamsize s = count / sizeof(Elem);
     std::streamsize scount = m_sb.sgetn(

Modified: branches/serialization_next_release/boost/boost/archive/basic_binary_oprimitive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/basic_binary_oprimitive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/basic_binary_oprimitive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -71,9 +71,10 @@
     Archive * This(){
         return static_cast<Archive *>(this);
     }
+ #ifndef BOOST_NO_STD_LOCALE
     boost::scoped_ptr<std::locale> archive_locale;
     basic_streambuf_locale_saver<Elem, Tr> locale_saver;
-
+ #endif
     // default saving of primitives.
     template<class T>
     void save(const T & t)

Modified: branches/serialization_next_release/boost/boost/archive/basic_streambuf_locale_saver.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/basic_streambuf_locale_saver.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/basic_streambuf_locale_saver.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -25,14 +25,13 @@
 // See <http://www.boost.org/libs/io/> for the library's home page.
 
 #ifndef BOOST_NO_STD_LOCALE
+
 #include <locale> // for std::locale
-#endif
 #include <streambuf> // for std::basic_streambuf
 
 namespace boost{
 namespace archive{
 
-#ifndef BOOST_NO_STD_LOCALE
 template < typename Ch, class Tr >
 class basic_streambuf_locale_saver
 {

Modified: branches/serialization_next_release/boost/boost/archive/basic_text_iprimitive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/basic_text_iprimitive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/basic_text_iprimitive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -68,10 +68,14 @@
     IStream &is;
     io::ios_flags_saver flags_saver;
     io::ios_precision_saver precision_saver;
+
+ #ifndef BOOST_NO_STD_LOCALE
     boost::scoped_ptr<std::locale> archive_locale;
     io::basic_ios_locale_saver<
         BOOST_DEDUCED_TYPENAME IStream::char_type, BOOST_DEDUCED_TYPENAME IStream::traits_type
> locale_saver;
+ #endif
+
     template<class T>
     void load(T & t)
     {

Modified: branches/serialization_next_release/boost/boost/archive/basic_text_oarchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/basic_text_oarchive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/basic_text_oarchive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -38,7 +38,7 @@
 namespace archive {
 
 /////////////////////////////////////////////////////////////////////////
-// class basic_text_iarchive - read serialized objects from a input text stream
+// class basic_text_oarchive
 template<class Archive>
 class basic_text_oarchive :
     public detail::common_oarchive<Archive>

Modified: branches/serialization_next_release/boost/boost/archive/basic_text_oprimitive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/basic_text_oprimitive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/basic_text_oprimitive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -71,10 +71,13 @@
     OStream &os;
     io::ios_flags_saver flags_saver;
     io::ios_precision_saver precision_saver;
+
+ #ifndef BOOST_NO_STD_LOCALE
     boost::scoped_ptr<std::locale> archive_locale;
     io::basic_ios_locale_saver<
         BOOST_DEDUCED_TYPENAME OStream::char_type, BOOST_DEDUCED_TYPENAME OStream::traits_type
> locale_saver;
+ #endif
 
     // default saving of primitives.
     template<class T>

Modified: branches/serialization_next_release/boost/boost/archive/detail/basic_iarchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/basic_iarchive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/basic_iarchive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -26,9 +26,6 @@
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 namespace boost {
-template<class T>
-class shared_ptr;
-
 namespace serialization {
     class extended_type_info;
 } // namespace serialization

Modified: branches/serialization_next_release/boost/boost/archive/detail/basic_oarchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/basic_oarchive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/basic_oarchive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -28,9 +28,6 @@
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 namespace boost {
-template<class T>
-class shared_ptr;
-
 namespace serialization {
     class extended_type_info;
 } // namespace serialization

Modified: branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_iserializer.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_iserializer.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_iserializer.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -1,5 +1,5 @@
-#ifndef BOOST_ARCHIVE_BASIC_ARCHIVE_POINTER_ISERIALIZER_HPP
-#define BOOST_ARCHIVE_BASIC_ARCHIVE_POINTER_ISERIALIZER_HPP
+#ifndef BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
+#define BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP
 
 // MS compatible compilers support #pragma once
 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
@@ -61,4 +61,4 @@
 
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
-#endif // BOOST_ARCHIVE_BASIC_ARCHIVE_POINTER_ISERIALIZER_HPP
+#endif // BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP

Modified: branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_oserializer.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_oserializer.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/basic_pointer_oserializer.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -1,5 +1,5 @@
-#ifndef BOOST_ARCHIVE_BASIC_ARCHIVE_POINTER_OSERIALIZER_HPP
-#define BOOST_ARCHIVE_BASIC_ARCHIVE_POINTER_OSERIALIZER_HPP
+#ifndef BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP
+#define BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP
 
 // MS compatible compilers support #pragma once
 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
@@ -59,4 +59,4 @@
 
 #include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
-#endif // BOOST_ARCHIVE_BASIC_ARCHIVE_POINTER_OSERIALIZER_HPP
+#endif // BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP

Modified: branches/serialization_next_release/boost/boost/archive/detail/interface_iarchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/interface_iarchive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/interface_iarchive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -23,12 +23,6 @@
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 namespace boost {
-template<class T>
-class shared_ptr;
-namespace serialization {
- class extended_type_info;
-} // namespace serialization
-
 namespace archive {
 namespace detail {
 

Modified: branches/serialization_next_release/boost/boost/archive/detail/interface_oarchive.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/interface_oarchive.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/interface_oarchive.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -23,12 +23,7 @@
 #include <boost/archive/detail/oserializer.hpp>
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
-namespace boost {
-template<class T>
-class shared_ptr;
-namespace serialization {
- class extended_type_info;
-} // namespace serialization
+namespace boost {
 namespace archive {
 namespace detail {
 

Modified: branches/serialization_next_release/boost/boost/archive/detail/iserializer.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/iserializer.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/iserializer.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -110,7 +110,7 @@
     // static one
     explicit iserializer() :
         basic_iserializer(
- * boost::serialization::type_info_implementation<T>::type::get_instance()
+ * boost::serialization::type_info_implementation<T>::type::find()
         )
     {}
 public:
@@ -136,11 +136,7 @@
         return ::boost::serialization::version<T>::value;
     }
     virtual bool is_polymorphic() const {
- typedef BOOST_DEDUCED_TYPENAME
- boost::serialization::type_info_implementation<
- T
- >::type::is_polymorphic::type typex;
- return typex::value;
+ return boost::is_polymorphic<T>::value;
     }
     static iserializer & get_instance(){
         static iserializer instance;
@@ -305,18 +301,14 @@
 }
 
 template<class Archive, class T>
-#if !defined(__BORLANDC__)
 BOOST_DLLEXPORT pointer_iserializer<Archive, T>::pointer_iserializer() :
     archive_pointer_iserializer<Archive>(
- * boost::serialization::type_info_implementation<T>::type::get_instance()
- ),
- m(boost::serialization::serialize_adl<Archive, T>),
- e(boost::serialization::type_info_implementation<T>::type::get_instance)
-#else
-BOOST_DLLEXPORT pointer_iserializer<Archive, T>::pointer_iserializer() :
- archive_pointer_iserializer<Archive>(
- * boost::serialization::type_info_implementation<T>::type::get_instance()
+ * boost::serialization::type_info_implementation<T>::type::find()
     )
+#if !defined(__BORLANDC__)
+ ,
+ m(boost::serialization::serialize_adl<Archive, T>),
+ e(boost::serialization::type_info_implementation<T>::type::find)
 #endif
 {
     iserializer<Archive, T> & bis = iserializer<Archive, T>::get_instance();
@@ -421,12 +413,8 @@
     struct abstract
     {
         static const basic_pointer_iserializer * register_type(Archive & /* ar */){
- #if ! defined(__BORLANDC__)
- typedef BOOST_DEDUCED_TYPENAME
- boost::serialization::type_info_implementation<T>::type::is_polymorphic typex;
             // it has? to be polymorphic
- BOOST_STATIC_ASSERT(typex::value);
- #endif
+ BOOST_STATIC_ASSERT(boost::is_polymorphic<T>::value);
             return static_cast<basic_pointer_iserializer *>(NULL);
          }
     };
@@ -464,7 +452,7 @@
         return static_cast<T *>(
             boost::serialization::void_upcast(
                 eti,
- * boost::serialization::type_info_implementation<T>::type::get_instance(),
+ * boost::serialization::type_info_implementation<T>::type::find(),
                 t
             )
         );
@@ -514,27 +502,6 @@
     }
 };
 
-#if 0
-// note bogus arguments to workaround msvc 6 silent runtime failure
-template<class Archive, class T>
-BOOST_DLLEXPORT
-inline const basic_pointer_iserializer &
-instantiate_pointer_iserializer(
- Archive * /* ar = NULL */,
- T * /* t = NULL */
-) BOOST_USED;
-
-template<class Archive, class T>
-BOOST_DLLEXPORT
-inline const basic_pointer_iserializer &
-instantiate_pointer_iserializer(
- Archive * /* ar = NULL */,
- T * /* t = NULL */
-){
- return pointer_iserializer<Archive,T>::instance;
-}
-#endif
-
 } // detail
 
 template<class Archive, class T>

Deleted: branches/serialization_next_release/boost/boost/archive/detail/known_archive_types.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/known_archive_types.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
+++ (empty file)
@@ -1,93 +0,0 @@
-#ifndef BOOST_ARCHIVE_KNOWN_ARCHIVE_TYPES_HPP
-#define BOOST_ARCHIVE_KNOWN_ARCHIVE_TYPES_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
-// known_archive_types.hpp: set traits of classes to be serialized
-
-// (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.
-
-// list of archive type shipped with the serialization system
-
-#include <boost/mpl/list.hpp>
-#include <boost/mpl/pop_front.hpp>
-
-namespace boost {
-namespace archive {
-
-// class text_oarchive;
-namespace detail {
-
-class null_type;
-
-struct known_archive_types {
- typedef
- mpl::pop_front<
- mpl::list<
- null_type
- #if defined(BOOST_ARCHIVE_TEXT_OARCHIVE_HPP)
- , boost::archive::text_oarchive
- #endif
- #if defined(BOOST_ARCHIVE_TEXT_IARCHIVE_HPP)
- , boost::archive::text_iarchive
- #endif
- #if defined(BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP)
- , boost::archive::text_woarchive
- #endif
- #if defined(BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP)
- , boost::archive::text_wiarchive
- #endif
- #if defined(BOOST_ARCHIVE_BINARY_OARCHIVE_HPP)
- , boost::archive::binary_oarchive
- #endif
- #if defined(BOOST_ARCHIVE_BINARY_IARCHIVE_HPP)
- , boost::archive::binary_iarchive
- #endif
- #if defined(BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP)
- , boost::archive::binary_woarchive
- #endif
- #if defined(BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP)
- , boost::archive::binary_wiarchive
- #endif
- #if defined(BOOST_ARCHIVE_XML_OARCHIVE_HPP)
- , boost::archive::xml_oarchive
- #endif
- #if defined(BOOST_ARCHIVE_XML_IARCHIVE_HPP)
- , boost::archive::xml_iarchive
- #endif
- #if defined(BOOST_ARCHIVE_XML_WOARCHIVE_HPP)
- , boost::archive::xml_woarchive
- #endif
- #if defined(BOOST_ARCHIVE_XML_WIARCHIVE_HPP)
- , boost::archive::xml_wiarchive
- #endif
- #if defined(BOOST_ARCHIVE_POLYMORPHIC_OARCHIVE_HPP)
- , boost::archive::polymorphic_oarchive
- #endif
- #if defined(BOOST_ARCHIVE_POLYMORPHIC_IARCHIVE_HPP)
- , boost::archive::polymorphic_iarchive
- #endif
- #if defined(BOOST_ARCHIVE_CUSTOM_IARCHIVE_TYPES)
- , BOOST_ARCHIVE_CUSTOM_IARCHIVE_TYPES
- #endif
- #if defined(BOOST_ARCHIVE_CUSTOM_OARCHIVE_TYPES)
- , BOOST_ARCHIVE_CUSTOM_OARCHIVE_TYPES
- #endif
- >::type
- >::type type;
-};
-
-} // namespace detail
-} // namespace archive
-} // namespace boost
-
-#endif // BOOST_ARCHIVE_KNOWN_ARCHIVE_TYPES_HPP

Deleted: branches/serialization_next_release/boost/boost/archive/detail/known_archive_types_fwd.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/known_archive_types_fwd.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
+++ (empty file)
@@ -1,39 +0,0 @@
-#ifndef BOOST_ARCHIVE_KNOWN_ARCHIVE_TYPES_FWD_HPP
-#define BOOST_ARCHIVE_KNOWN_ARCHIVE_TYPES_FWD_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
-// known_archive_types_fwd.hpp: set traits of classes to be serialized
-
-// (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.
-
-// list of archive type shipped with the serialization system
-
-#include <boost/mpl/list.hpp>
-
-namespace boost {
-namespace archive {
-namespace detail {
-
-// default implementation of known_archive_types list - 0 elements
-// used to generate warning when a polymporhic pointer is serialized
-// to an unknown archive - export would otherwise fail silently
-template<bool>
-struct known_archive_types {
- typedef mpl::list<> type;
-};
-
-} // namespace detail
-} // namespace archive
-} // namespace boost
-
-#endif // BOOST_ARCHIVE_KNOWN_ARCHIVE_TYPES_FWD

Modified: branches/serialization_next_release/boost/boost/archive/detail/oserializer.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/detail/oserializer.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/detail/oserializer.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -37,6 +37,7 @@
 #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_all_extents.hpp>
 #include <boost/serialization/is_abstract.hpp>
 
@@ -106,7 +107,7 @@
     // static one
     explicit BOOST_DLLEXPORT oserializer() :
         basic_oserializer(
- * boost::serialization::type_info_implementation<T>::type::get_instance()
+ * boost::serialization::type_info_implementation<T>::type::find()
         )
     {}
 public:
@@ -129,10 +130,7 @@
         return ::boost::serialization::version<T>::value;
     }
     virtual bool is_polymorphic() const {
- typedef BOOST_DEDUCED_TYPENAME boost::serialization::type_info_implementation<
- T
- >::type::is_polymorphic::type typex;
- return typex::value;
+ return boost::is_polymorphic<T>::value;
     }
     static oserializer & get_instance(){
         static oserializer instance;
@@ -205,18 +203,14 @@
 }
 
 template<class Archive, class T>
-#if !defined(__BORLANDC__)
 BOOST_DLLEXPORT pointer_oserializer<Archive, T>::pointer_oserializer() :
     archive_pointer_oserializer<Archive>(
- * boost::serialization::type_info_implementation<T>::type::get_instance()
- ),
- m(boost::serialization::serialize_adl<Archive, T>),
- e(boost::serialization::type_info_implementation<T>::type::get_instance)
-#else
-BOOST_DLLEXPORT pointer_oserializer<Archive, T>::pointer_oserializer() :
- archive_pointer_oserializer<Archive>(
- * boost::serialization::type_info_implementation<T>::type::get_instance()
+ * boost::serialization::type_info_implementation<T>::type::find()
     )
+#if !defined(__BORLANDC__)
+ ,
+ m(boost::serialization::serialize_adl<Archive, T>),
+ e(boost::serialization::type_info_implementation<T>::type::find)
 #endif
 {
     // make sure appropriate member function is instantiated
@@ -325,9 +319,7 @@
     {
         static const basic_pointer_oserializer * register_type(Archive & /* ar */){
             // it has? to be polymorphic
- BOOST_STATIC_ASSERT(
- boost::serialization::type_info_implementation<T>::type::is_polymorphic::value
- );
+ BOOST_STATIC_ASSERT(boost::is_polymorphic<T>::value);
             return static_cast<const basic_pointer_oserializer *>(NULL);
         }
     };
@@ -377,14 +369,14 @@
             const basic_pointer_oserializer * bpos_ptr
         ){
             const boost::serialization::extended_type_info * this_type
- = boost::serialization::type_info_implementation<T>::type::get_instance();
+ = boost::serialization::type_info_implementation<T>::type::find();
             // retrieve the true type of the object pointed to
             // if this assertion fails its an error in this library
             assert(NULL != this_type);
             const boost::serialization::extended_type_info * true_type
                 = boost::serialization::type_info_implementation<T>::type::get_derived_extended_type_info(t);
             // note:if this exception is thrown, be sure that derived pointer
- // is either regsitered or exported.
+ // is either registered or exported.
             if(NULL == true_type){
                 boost::throw_exception(
                     archive_exception(archive_exception::unregistered_class)
@@ -419,19 +411,23 @@
         }
     };
 
+ // out of line selector works around borland quirk
+ template<class T>
+ struct conditional {
+ typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
+ is_polymorphic<T>,
+ mpl::identity<polymorphic<T> >,
+ mpl::identity<non_polymorphic<T> >
+ >::type type;
+ };
+
     template<class T>
     static void save(
         Archive & ar,
         const T &t,
         const basic_pointer_oserializer * bpos_ptr
     ){
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- BOOST_DEDUCED_TYPENAME boost::serialization::
- type_info_implementation<T>::type::is_polymorphic,
- mpl::identity<polymorphic<T> >,
- mpl::identity<non_polymorphic<T> >
- >::type typey;
- typey::save(ar, const_cast<T &>(t), bpos_ptr);
+ conditional<T>::type::save(ar, const_cast<T &>(t), bpos_ptr);
     }
 
     template<class T>
@@ -490,27 +486,6 @@
     }
 };
 
-
-#if 0
-// note bogus arguments to workaround msvc 6 silent runtime failure
-// declaration to satisfy gcc
-template<class Archive, class T>
-BOOST_DLLEXPORT const basic_pointer_oserializer &
-instantiate_pointer_oserializer(
- Archive * /* ar = NULL */,
- T * /* t = NULL */
-) BOOST_USED ;
-// definition
-template<class Archive, class T>
-BOOST_DLLEXPORT const basic_pointer_oserializer &
-instantiate_pointer_oserializer(
- Archive * /* ar = NULL */,
- T * /* t = NULL */
-){
- return pointer_oserializer<Archive, T>::instance;
-}
-#endif
-
 } // detail
 
 template<class Archive, class T>

Modified: branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iarchive.ipp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iarchive.ipp (original)
+++ branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iarchive.ipp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -22,7 +22,6 @@
 #include <boost/detail/workaround.hpp>
 
 #include <boost/archive/basic_binary_iarchive.hpp>
-//#include <boost/serialization/extended_type_info.hpp>
 
 namespace boost {
 namespace archive {

Modified: branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iprimitive.ipp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iprimitive.ipp (original)
+++ branches/serialization_next_release/boost/boost/archive/impl/basic_binary_iprimitive.ipp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -133,6 +133,7 @@
     std::basic_streambuf<Elem, Tr> & sb,
     bool no_codecvt
 ) :
+#ifndef BOOST_NO_STD_LOCALE
     m_sb(sb),
     archive_locale(NULL),
     locale_saver(m_sb)
@@ -147,6 +148,10 @@
         m_sb.pubimbue(* archive_locale);
     }
 }
+#else
+ m_sb(sb)
+{}
+#endif
 
 // some libraries including stl and libcomo fail if the
 // buffer isn't flushed before the code_cvt facet is changed.

Modified: branches/serialization_next_release/boost/boost/archive/impl/basic_binary_oprimitive.ipp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/impl/basic_binary_oprimitive.ipp (original)
+++ branches/serialization_next_release/boost/boost/archive/impl/basic_binary_oprimitive.ipp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -103,6 +103,7 @@
     std::basic_streambuf<Elem, Tr> & sb,
     bool no_codecvt
 ) :
+#ifndef BOOST_NO_STD_LOCALE
     m_sb(sb),
     archive_locale(NULL),
     locale_saver(m_sb)
@@ -117,6 +118,10 @@
         m_sb.pubimbue(* archive_locale);
     }
 }
+#else
+ m_sb(sb)
+{}
+#endif
 
 // some libraries including stl and libcomo fail if the
 // buffer isn't flushed before the code_cvt facet is changed.

Modified: branches/serialization_next_release/boost/boost/archive/impl/basic_text_iarchive.ipp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/impl/basic_text_iarchive.ipp (original)
+++ branches/serialization_next_release/boost/boost/archive/impl/basic_text_iarchive.ipp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -22,7 +22,6 @@
 #include <boost/detail/workaround.hpp>
 
 #include <boost/archive/basic_text_iarchive.hpp>
-//#include <boost/serialization/extended_type_info.hpp>
 
 namespace boost {
 namespace archive {

Modified: branches/serialization_next_release/boost/boost/archive/impl/basic_text_iprimitive.ipp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/impl/basic_text_iprimitive.ipp (original)
+++ branches/serialization_next_release/boost/boost/archive/impl/basic_text_iprimitive.ipp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -94,7 +94,8 @@
 basic_text_iprimitive<IStream>::basic_text_iprimitive(
     IStream &is_,
     bool no_codecvt
-) :
+) :
+#ifndef BOOST_NO_STD_LOCALE
     is(is_),
     flags_saver(is_),
     precision_saver(is_),
@@ -112,6 +113,12 @@
     }
     is >> std::noboolalpha;
 }
+#else
+ is(is_),
+ flags_saver(is_),
+ precision_saver(is_)
+{}
+#endif
 
 template<class IStream>
 BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())

Modified: branches/serialization_next_release/boost/boost/archive/impl/basic_text_oprimitive.ipp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/impl/basic_text_oprimitive.ipp (original)
+++ branches/serialization_next_release/boost/boost/archive/impl/basic_text_oprimitive.ipp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -75,6 +75,7 @@
     OStream & os_,
     bool no_codecvt
 ) :
+#ifndef BOOST_NO_STD_LOCALE
     os(os_),
     flags_saver(os_),
     precision_saver(os_),
@@ -92,6 +93,12 @@
     }
     os << std::noboolalpha;
 }
+#else
+ os(os_),
+ flags_saver(os_),
+ precision_saver(os_)
+{}
+#endif
 
 template<class OStream>
 BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())

Modified: branches/serialization_next_release/boost/boost/archive/impl/basic_xml_iarchive.ipp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/impl/basic_xml_iarchive.ipp (original)
+++ branches/serialization_next_release/boost/boost/archive/impl/basic_xml_iarchive.ipp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -15,7 +15,6 @@
 
 #include <boost/archive/basic_xml_iarchive.hpp>
 #include <boost/serialization/tracking.hpp>
-//#include <boost/serialization/extended_type_info.hpp>
 
 namespace boost {
 namespace archive {

Modified: branches/serialization_next_release/boost/boost/archive/shared_ptr_helper.hpp
==============================================================================
--- branches/serialization_next_release/boost/boost/archive/shared_ptr_helper.hpp (original)
+++ branches/serialization_next_release/boost/boost/archive/shared_ptr_helper.hpp 2007-09-27 00:01:51 EDT (Thu, 27 Sep 2007)
@@ -21,6 +21,7 @@
 
 #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/throw_exception.hpp>
 
@@ -97,10 +98,11 @@
                 )
             );
         const boost::serialization::extended_type_info * this_type
- = boost::serialization::type_info_implementation<T>::type::get_instance();
+ = boost::serialization::type_info_implementation<T>::type::find();
         void * vp = void_downcast(*true_type, *this_type, t);
         return vp;
     }
+public:
     template<class T>
     void reset(shared_ptr<T> & s, T * r){
         if(NULL == r){


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