Boost logo

Boost-Commit :

From: ramey_at_[hidden]
Date: 2007-11-01 16:30:49


Author: ramey
Date: 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
New Revision: 40665
URL: http://svn.boost.org/trac/boost/changeset/40665

Log:
passing all msvc and gcc tests
except gcc(release) test_no_rtti and test_shared_ptr132
tweaks to suppress uninteresting warnings on gcc
Text files modified:
   branches/serialization_next_release/boost/libs/serialization/test/B.hpp | 35 -----------------
   branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp | 20 ++++------
   branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp | 24 ++++--------
   branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp | 80 +++++++++++++++-------------------------
   branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp | 38 +++++++++----------
   branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp | 32 ++++++----------
   branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp | 5 +-
   7 files changed, 78 insertions(+), 156 deletions(-)

Modified: branches/serialization_next_release/boost/libs/serialization/test/B.hpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/B.hpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/B.hpp 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
@@ -109,39 +109,4 @@
     ;
 }
 
-#if 0
-template<class Archive>
-void inline B::save(Archive &ar, const unsigned int /* file_version */) const
-{
- // write any base class info to the archive
- ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(A);
-
- // write out members
- ar << BOOST_SERIALIZATION_NVP(s);
- ar << BOOST_SERIALIZATION_NVP(t);
- ar << BOOST_SERIALIZATION_NVP(u);
- ar << BOOST_SERIALIZATION_NVP(v);
- ar << BOOST_SERIALIZATION_NVP(w);
- ar << BOOST_SERIALIZATION_NVP(x);
-}
-
-template<class Archive>
-inline void B::load(Archive & ar, const unsigned int file_version)
-{
- // read any base class info to the archive
- ar >> BOOST_SERIALIZATION_BASE_OBJECT_NVP(A);
- switch(file_version){
- case 1:
- case 2:
- ar >> BOOST_SERIALIZATION_NVP(s);
- ar >> BOOST_SERIALIZATION_NVP(t);
- ar >> BOOST_SERIALIZATION_NVP(u);
- ar >> BOOST_SERIALIZATION_NVP(v);
- ar >> BOOST_SERIALIZATION_NVP(w);
- ar >> BOOST_SERIALIZATION_NVP(x);
- default:
- break;
- }
-}
-#endif
 #endif // BOOST_SERIALIZATION_TEST_B_HPP

Modified: branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_derived.cpp 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
@@ -69,14 +69,12 @@
     // Warning, the current type id system does not yield true
     // type id for non-polymorphic types
     const boost::serialization::extended_type_info & this_type
- = boost::serialization::singleton<
- boost::serialization::type_info_implementation<base>::type
- >::get_const_instance();
+ = boost::serialization::type_info_implementation<base>::type
+ ::get_const_instance();
     // retrieve the true type of the object pointed to
     const boost::serialization::extended_type_info & true_type
- = * boost::serialization::singleton<
- boost::serialization::type_info_implementation<base>::type
- >::get_const_instance().get_derived_extended_type_info(*b1);
+ = * boost::serialization::type_info_implementation<base>::type
+ ::get_const_instance().get_derived_extended_type_info(*b1);
 
     BOOST_WARN_MESSAGE(
         !(this_type == true_type),
@@ -109,14 +107,12 @@
     // Warning, the current type id system does not yield true
     // type id for non-polymorphic types
     const boost::serialization::extended_type_info & this_type
- = boost::serialization::singleton<
- boost::serialization::type_info_implementation<base>::type
- >::get_const_instance();
+ = boost::serialization::type_info_implementation<base>::type
+ ::get_const_instance();
     // retrieve the true type of the object pointed to
     const boost::serialization::extended_type_info & true_type
- = * boost::serialization::singleton<
- boost::serialization::type_info_implementation<base>::type
- >::get_const_instance().get_derived_extended_type_info(*b1);
+ = * boost::serialization::type_info_implementation<base>::type
+ ::get_const_instance().get_derived_extended_type_info(*b1);
             
     BOOST_WARN_MESSAGE(
         ! (this_type == true_type),

Modified: branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_exported.cpp 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
@@ -100,29 +100,21 @@
     // through a pointer to a base class
     ia >> BOOST_SERIALIZATION_NVP(rb1);
     BOOST_CHECK_MESSAGE(
- & boost::serialization::singleton<
- boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type
- >::get_const_instance()
+ & boost::serialization::type_info_implementation<polymorphic_derived1>
+ ::type::get_const_instance()
         ==
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<polymorphic_base>
- ::type
- >::get_const_instance().get_derived_extended_type_info(*rb1),
+ boost::serialization::type_info_implementation<polymorphic_base>
+ ::type::get_const_instance().get_derived_extended_type_info(*rb1),
         "restored pointer b1 not of correct type"
     );
 
     ia >> BOOST_SERIALIZATION_NVP(rb2);
     BOOST_CHECK_MESSAGE(
- & boost::serialization::singleton<
- boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type
- >::get_const_instance()
+ & boost::serialization::type_info_implementation<polymorphic_derived2>
+ ::type::get_const_instance()
         ==
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<polymorphic_base>
- ::type
- >::get_const_instance().get_derived_extended_type_info(*rb2),
+ boost::serialization::type_info_implementation<polymorphic_base>
+ ::type::get_const_instance().get_derived_extended_type_info(*rb2),
         "restored pointer b2 not of correct type"
     );
 

Modified: branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_no_rtti.cpp 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
@@ -76,11 +76,9 @@
 
 const char * polymorphic_derived1::get_key() const {
     return
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived1
- >::type
- >::get_const_instance().get_key();
+ boost::serialization::type_info_implementation<
+ polymorphic_derived1
+ >::type::get_const_instance().get_key();
 }
 
 class polymorphic_derived2 : public polymorphic_base
@@ -105,11 +103,9 @@
 const char * polymorphic_derived2::get_key() const {
     // use the exported key as the identifier
     return
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived2
- >::type
- >::get_const_instance().get_key();
+ boost::serialization::type_info_implementation<
+ polymorphic_derived2
+ >::type::get_const_instance().get_key();
 }
 
 // save derived polymorphic class
@@ -148,17 +144,13 @@
     ia >> BOOST_SERIALIZATION_NVP(rd1);
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived1
- >::type
- >::get_const_instance()
+ boost::serialization::type_info_implementation<
+ polymorphic_derived1
+ >::type::get_const_instance()
         ==
- * boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived1
- >::type
- >::get_const_instance().get_derived_extended_type_info(*rd1)
+ * boost::serialization::type_info_implementation<
+ polymorphic_derived1
+ >::type::get_const_instance().get_derived_extended_type_info(*rd1)
         ,
         "restored pointer d1 not of correct type"
     );
@@ -166,17 +158,13 @@
     ia >> BOOST_SERIALIZATION_NVP(rd2);
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived2
- >::type
- >::get_const_instance()
+ boost::serialization::type_info_implementation<
+ polymorphic_derived2
+ >::type::get_const_instance()
         ==
- * boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived2
- >::type
- >::get_const_instance().get_derived_extended_type_info(*rd2)
+ * boost::serialization::type_info_implementation<
+ polymorphic_derived2
+ >::type::get_const_instance().get_derived_extended_type_info(*rd2)
         ,
         "restored pointer d2 not of correct type"
     );
@@ -195,17 +183,13 @@
     );
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived1
- >::type
- >::get_const_instance()
+ boost::serialization::type_info_implementation<
+ polymorphic_derived1
+ >::type::get_const_instance()
         ==
- * boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_base
- >::type
- >::get_const_instance().get_derived_extended_type_info(*rb1)
+ * boost::serialization::type_info_implementation<
+ polymorphic_base
+ >::type::get_const_instance().get_derived_extended_type_info(*rb1)
         ,
         "restored pointer b1 not of correct type"
     );
@@ -218,17 +202,13 @@
     );
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived2
- >::type
- >::get_const_instance()
+ boost::serialization::type_info_implementation<
+ polymorphic_derived2
+ >::type::get_const_instance()
         ==
- * boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_base
- >::type
- >::get_const_instance().get_derived_extended_type_info(*rb2)
+ * boost::serialization::type_info_implementation<
+ polymorphic_base
+ >::type::get_const_instance().get_derived_extended_type_info(*rb2)
         ,
         "restored pointer b2 not of correct type"
     );

Modified: branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_registered.cpp 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
@@ -97,16 +97,14 @@
     ia >> BOOST_SERIALIZATION_NVP(rd1);
 
     const boost::serialization::extended_type_info * p1;
- p1 = boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived1
- >::type>::get_const_instance();
+ p1 = & boost::serialization::type_info_implementation<polymorphic_derived1>
+ ::type::get_const_instance();
 
     BOOST_CHECK(NULL != p1);
 
     const boost::serialization::extended_type_info * p2;
     p2 = boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_derived_extended_type_info(*rd1);
+ ::type::get_const_instance().get_derived_extended_type_info(*rd1);
 
     BOOST_CHECK(NULL != p2);
 
@@ -115,11 +113,11 @@
     ia >> BOOST_SERIALIZATION_NVP(rd2);
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ & boost::serialization::type_info_implementation<polymorphic_derived2>
+ ::type::get_const_instance()
         ==
         boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_derived_extended_type_info(*rd2),
+ ::type::get_const_instance().get_derived_extended_type_info(*rd2),
         "restored pointer d2 not of correct type"
     );
 
@@ -136,13 +134,13 @@
         "serialized pointers not correctly restored"
     );
 
- p1 = boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance();
+ p1 = & boost::serialization::type_info_implementation<polymorphic_derived1>
+ ::type::get_const_instance();
 
     BOOST_CHECK(NULL != p1);
 
     p2 = boost::serialization::type_info_implementation<polymorphic_base>
- ::type::get_derived_extended_type_info(*rb1);
+ ::type::get_const_instance().get_derived_extended_type_info(*rb1);
 
     BOOST_CHECK(NULL != p2);
 
@@ -156,10 +154,10 @@
     );
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ & boost::serialization::type_info_implementation<polymorphic_derived2>
+ ::type::get_const_instance()
         == boost::serialization::type_info_implementation<polymorphic_base>
- ::type::get_derived_extended_type_info(*rb2),
+ ::type::get_const_instance().get_derived_extended_type_info(*rb2),
         "restored pointer b2 not of correct type"
     );
 
@@ -202,18 +200,18 @@
     ia >> BOOST_SERIALIZATION_NVP(rb1) >> BOOST_SERIALIZATION_NVP(rb2);
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::type_info_implementation<polymorphic_derived1>
- ::type::get_instance()
+ & boost::serialization::type_info_implementation<polymorphic_derived1>
+ ::type::get_const_instance()
         == boost::serialization::type_info_implementation<polymorphic_base>
- ::type::get_derived_extended_type_info(*rb1),
+ ::type::get_const_instance().get_derived_extended_type_info(*rb1),
         "restored pointer b1 not of correct type"
     );
 
     BOOST_CHECK_MESSAGE(
- boost::serialization::type_info_implementation<polymorphic_derived2>
- ::type::get_instance()
+ & boost::serialization::type_info_implementation<polymorphic_derived2>
+ ::type::get_const_instance()
         == boost::serialization::type_info_implementation<polymorphic_base>
- ::type::get_derived_extended_type_info(*rb2),
+ ::type::get_const_instance().get_derived_extended_type_info(*rb2),
         "restored pointer b2 not of correct type"
     );
 

Modified: branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_unregistered.cpp 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
@@ -199,34 +199,26 @@
 
     BOOST_CHECK_MESSAGE(NULL != rb1, "Load resulted in NULL pointer");
     BOOST_CHECK_MESSAGE(
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived1
- >::type
- >::get_const_instance()
+ boost::serialization::type_info_implementation<
+ polymorphic_derived1
+ >::type::get_const_instance()
         ==
- * boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_base
- >::type
- >::get_const_instance().get_derived_extended_type_info(*rb1),
+ * boost::serialization::type_info_implementation<
+ polymorphic_base
+ >::type::get_const_instance().get_derived_extended_type_info(*rb1),
         "restored pointer b1 not of correct type"
     );
 
     ia >> BOOST_SERIALIZATION_NVP(rb2);
     BOOST_CHECK_MESSAGE(NULL != rb2, "Load resulted in NULL pointer");
     BOOST_CHECK_MESSAGE(
- boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_derived2
- >::type
- >::get_const_instance()
+ boost::serialization::type_info_implementation<
+ polymorphic_derived2
+ >::type::get_const_instance()
         ==
- * boost::serialization::singleton<
- boost::serialization::type_info_implementation<
- polymorphic_base
- >::type
- >::get_const_instance().get_derived_extended_type_info(*rb2),
+ * boost::serialization::type_info_implementation<
+ polymorphic_base
+ >::type::get_const_instance().get_derived_extended_type_info(*rb2),
         "restored pointer b2 not of correct type"
     );
 

Modified: branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp
==============================================================================
--- branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp (original)
+++ branches/serialization_next_release/boost/libs/serialization/test/test_void_cast.cpp 2007-11-01 16:30:48 EDT (Thu, 01 Nov 2007)
@@ -33,9 +33,8 @@
 
 template<class T>
 const boost::serialization::extended_type_info & eti(){
- return boost::serialization::singleton<
- boost::serialization::extended_type_info_typeid<T>
- >::get_const_instance();
+ return boost::serialization::extended_type_info_typeid<T>
+ ::get_const_instance();
 }
 
 int


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