Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2008-06-22 23:48:01


Author: ramey
Date: 2008-06-22 23:48:01 EDT (Sun, 22 Jun 2008)
New Revision: 46621
URL: http://svn.boost.org/trac/boost/changeset/46621

Log:
Attempt to resolve problems with instantiation on Intel Platforms
Text files modified:
   trunk/boost/archive/detail/iserializer.hpp | 12 ++++++------
   trunk/boost/archive/detail/oserializer.hpp | 21 +++++++++++----------
   trunk/boost/serialization/export.hpp | 11 ++++++-----
   trunk/boost/serialization/singleton.hpp | 5 ++---
   trunk/boost/serialization/void_cast.hpp | 7 ++++---
   5 files changed, 29 insertions(+), 27 deletions(-)

Modified: trunk/boost/archive/detail/iserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/iserializer.hpp (original)
+++ trunk/boost/archive/detail/iserializer.hpp 2008-06-22 23:48:01 EDT (Sun, 22 Jun 2008)
@@ -116,11 +116,11 @@
                 ::get_const_instance()
         )
     {}
- virtual void load_object_data(
+ virtual BOOST_DLLEXPORT void load_object_data(
         basic_iarchive & ar,
         void *x,
         const unsigned int file_version
- ) const;
+ ) const BOOST_USED;
     virtual bool class_info() const {
         return boost::serialization::implementation_level<T>::value
>= boost::serialization::object_class_info;
@@ -142,7 +142,7 @@
 };
 
 template<class Archive, class T>
-void iserializer<Archive, T>::load_object_data(
+BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
     basic_iarchive & ar,
     void *x,
     const unsigned int file_version
@@ -166,11 +166,11 @@
             iserializer<Archive, T>
>::get_const_instance();
     }
- virtual void load_object_ptr(
+ BOOST_DLLEXPORT virtual void load_object_ptr(
         basic_iarchive & ar,
         void * & x,
         const unsigned int file_version
- ) const ;
+ ) const BOOST_USED;
 public:
     pointer_iserializer();
 };
@@ -246,7 +246,7 @@
 };
 
 template<class Archive, class T>
-void pointer_iserializer<Archive, T>::load_object_ptr(
+BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
     basic_iarchive & ar,
     void * & x,
     const unsigned int file_version

Modified: trunk/boost/archive/detail/oserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/oserializer.hpp (original)
+++ trunk/boost/archive/detail/oserializer.hpp 2008-06-22 23:48:01 EDT (Sun, 22 Jun 2008)
@@ -105,16 +105,16 @@
     // private constructor to inhibit any existence other than the
     // static one
 public:
- explicit oserializer() :
+ explicit BOOST_DLLEXPORT oserializer() :
         basic_oserializer(
             boost::serialization::type_info_implementation<T>::type
                 ::get_const_instance()
         )
     {}
- virtual void save_object_data(
+ virtual BOOST_DLLEXPORT void save_object_data(
         basic_oarchive & ar,
         const void *x
- ) const ;
+ ) const BOOST_USED;
     virtual bool class_info() const {
         return boost::serialization::implementation_level<T>::value
>= boost::serialization::object_class_info;
@@ -134,7 +134,7 @@
 };
 
 template<class Archive, class T>
-void oserializer<Archive, T>::save_object_data(
+BOOST_DLLEXPORT void oserializer<Archive, T>::save_object_data(
     basic_oarchive & ar,
     const void *x
 ) const {
@@ -154,12 +154,12 @@
 {
     const basic_oserializer & get_basic_serializer() const;
 private:
- virtual void save_object_ptr(
+ virtual BOOST_DLLEXPORT void save_object_ptr(
         basic_oarchive & ar,
         const void * x
- ) const ;
+ ) const BOOST_USED;
 public:
- explicit pointer_oserializer();
+ explicit BOOST_DLLEXPORT pointer_oserializer() BOOST_USED;
 };
 
 template<class Archive, class T>
@@ -171,7 +171,7 @@
 }
 
 template<class Archive, class T>
-void pointer_oserializer<Archive, T>::save_object_ptr(
+BOOST_DLLEXPORT void pointer_oserializer<Archive, T>::save_object_ptr(
     basic_oarchive & ar,
     const void * x
 ) const {
@@ -190,7 +190,7 @@
 }
 
 template<class Archive, class T>
-pointer_oserializer<Archive, T>::pointer_oserializer() :
+BOOST_DLLEXPORT pointer_oserializer<Archive, T>::pointer_oserializer() :
     archive_pointer_oserializer<Archive>(
         boost::serialization::type_info_implementation<T>::type
             ::get_const_instance()
@@ -352,7 +352,8 @@
             Archive &ar,
             T & t
         ){
- BOOST_DEDUCED_TYPENAME boost::serialization::type_info_implementation<T>::type
+ BOOST_DEDUCED_TYPENAME
+ boost::serialization::type_info_implementation<T>::type
                 const & i = boost::serialization::type_info_implementation<T>::type
                     ::get_const_instance();
 

Modified: trunk/boost/serialization/export.hpp
==============================================================================
--- trunk/boost/serialization/export.hpp (original)
+++ trunk/boost/serialization/export.hpp 2008-06-22 23:48:01 EDT (Sun, 22 Jun 2008)
@@ -63,14 +63,14 @@
 {
     static const basic_pointer_iserializer &
     enable_load(mpl::true_){
- return /* BOOST_DEDUCED_TYPENAME */ boost::serialization::singleton<
+ return boost::serialization::singleton<
             pointer_iserializer<Archive, Serializable>
>::get_const_instance();
     }
 
     static const basic_pointer_oserializer &
     enable_save(mpl::true_){
- return /* BOOST_DEDUCED_TYPENAME */ boost::serialization::singleton<
+ return boost::serialization::singleton<
             pointer_oserializer<Archive, Serializable>
>::get_const_instance();
     }
@@ -87,9 +87,9 @@
 struct ptr_serialization_support
 {
 # if defined(BOOST_MSVC)
- virtual BOOST_DLLEXPORT void instantiate() BOOST_USED;
+ BOOST_DLLEXPORT static void instantiate() BOOST_USED;
 # elif defined(__INTEL_COMPILER)
- virtual BOOST_DLLEXPORT void instantiate() BOOST_USED;
+ BOOST_DLLEXPORT static void instantiate() BOOST_USED;
 # elif defined(__BORLANDC__)
     static BOOST_DLLEXPORT void instantiate();
     enum { x = sizeof(instantiate(),3) };
@@ -102,7 +102,8 @@
 };
 
 template <class Archive, class Serializable>
-BOOST_DLLEXPORT void ptr_serialization_support<Archive,Serializable>::instantiate()
+BOOST_DLLEXPORT void
+ptr_serialization_support<Archive,Serializable>::instantiate()
 {
     export_impl<Archive,Serializable>::enable_save(
         BOOST_DEDUCED_TYPENAME Archive::is_saving()

Modified: trunk/boost/serialization/singleton.hpp
==============================================================================
--- trunk/boost/serialization/singleton.hpp (original)
+++ trunk/boost/serialization/singleton.hpp 2008-06-22 23:48:01 EDT (Sun, 22 Jun 2008)
@@ -108,14 +108,13 @@
         return t;
     }
 public:
- static T & get_mutable_instance(){
+ BOOST_DLLEXPORT static T & get_mutable_instance(){
         assert(! is_locked());
         return get_instance();
     }
- static const T & get_const_instance(){
+ BOOST_DLLEXPORT static const T & get_const_instance(){
         return get_instance();
     }
-
 };
 
 template<class T>

Modified: trunk/boost/serialization/void_cast.hpp
==============================================================================
--- trunk/boost/serialization/void_cast.hpp (original)
+++ trunk/boost/serialization/void_cast.hpp 2008-06-22 23:48:01 EDT (Sun, 22 Jun 2008)
@@ -22,6 +22,7 @@
 #include <boost/serialization/force_include.hpp>
 #include <boost/serialization/type_info_implementation.hpp>
 #include <boost/serialization/config.hpp>
+#include <boost/serialization/force_include.hpp>
 #include <boost/config/abi_prefix.hpp> // must be the last header
 
 #ifdef BOOST_MSVC
@@ -32,7 +33,7 @@
 namespace boost {
 namespace serialization {
 
-class extended_type_info;
+BOOST_SERIALIZATION_DECL(BOOST_PP_EMPTY()) class extended_type_info;
 
 // Given a void *, assume that it really points to an instance of one type
 // and alter it so that it would point to an instance of a related type.
@@ -138,12 +139,12 @@
         return b;
     }
 public:
- void_caster_primitive();
+ BOOST_DLLEXPORT void_caster_primitive() BOOST_USED;
     ~void_caster_primitive();
 };
 
 template <class Derived, class Base>
-void_caster_primitive<Derived, Base>::void_caster_primitive() :
+BOOST_DLLEXPORT void_caster_primitive<Derived, Base>::void_caster_primitive() :
     void_caster(
         type_info_implementation<Derived>::type::get_const_instance(),
         type_info_implementation<Base>::type::get_const_instance()


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