Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56111 - in branches/release: boost libs/multi_index/doc
From: joaquin_at_[hidden]
Date: 2009-09-08 16:20:36


Author: joaquin
Date: 2009-09-08 16:20:35 EDT (Tue, 08 Sep 2009)
New Revision: 56111
URL: http://svn.boost.org/trac/boost/changeset/56111

Log:
merged [55994] and [55995] from trunk
Text files modified:
   branches/release/boost/multi_index_container.hpp | 39 +++++++++++++++++++++++++++++++++++++++
   branches/release/libs/multi_index/doc/release_notes.html | 19 +++++++++++++++++--
   2 files changed, 56 insertions(+), 2 deletions(-)

Modified: branches/release/boost/multi_index_container.hpp
==============================================================================
--- branches/release/boost/multi_index_container.hpp (original)
+++ branches/release/boost/multi_index_container.hpp 2009-09-08 16:20:35 EDT (Tue, 08 Sep 2009)
@@ -44,8 +44,10 @@
 
 #if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
 #include <boost/multi_index/detail/archive_constructed.hpp>
+#include <boost/serialization/collection_size_type.hpp>
 #include <boost/serialization/nvp.hpp>
 #include <boost/serialization/split_member.hpp>
+#include <boost/serialization/version.hpp>
 #include <boost/throw_exception.hpp>
 #endif
 
@@ -630,8 +632,15 @@
   template<class Archive>
   void save(Archive& ar,const unsigned int version)const
   {
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ const serialization::collection_size_type s(size_());
+ ar<<serialization::make_nvp("count",s);
+#else
     const std::size_t s=size_();
     ar<<serialization::make_nvp("count",s);
+#endif
+
     index_saver_type sm(bfm_allocator::member,s);
 
     for(iterator it=super::begin(),it_end=super::end();it!=it_end;++it){
@@ -650,8 +659,21 @@
 
     clear_();
 
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+ serialization::collection_size_type s;
+ if(version<1){
+ std::size_t sz;
+ ar>>serialization::make_nvp("count",sz);
+ s=sz;
+ }
+ else{
+ ar>>serialization::make_nvp("count",s);
+ }
+#else
     std::size_t s;
     ar>>serialization::make_nvp("count",s);
+#endif
+
     index_loader_type lm(bfm_allocator::member,s);
 
     for(std::size_t n=0;n<s;++n){
@@ -1076,6 +1098,23 @@
 
 } /* namespace multi_index */
 
+#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)&&\
+ !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+/* Serialization class version bump as we now serialize the size
+ * through boost::serialization::collection_size_type.
+ */
+
+namespace serialization {
+template<typename Value,typename IndexSpecifierList,typename Allocator>
+struct version<
+ boost::multi_index_container<Value,IndexSpecifierList,Allocator>
+>
+{
+ BOOST_STATIC_CONSTANT(unsigned int,value=1);
+};
+} /* namespace serialization */
+#endif
+
 /* Associated global functions are promoted to namespace boost, except
  * comparison operators and swap, which are meant to be Koenig looked-up.
  */

Modified: branches/release/libs/multi_index/doc/release_notes.html
==============================================================================
--- branches/release/libs/multi_index/doc/release_notes.html (original)
+++ branches/release/libs/multi_index/doc/release_notes.html 2009-09-08 16:20:35 EDT (Tue, 08 Sep 2009)
@@ -31,6 +31,7 @@
 <h2>Contents</h2>
 
 <ul>
+ <li>Boost 1.41 release</li>
   <li>Boost 1.38 release</li>
   <li>Boost 1.37 release</li>
   <li>Boost 1.36 release</li>
@@ -40,6 +41,20 @@
   <li>Boost 1.33 release</li>
 </ul>
 
+<h2><a name="boost_1_41">Boost 1.41 release</a></h2>
+<p>
+<ul>
+ <li>Serialization now uses the portable
+ collection_size_type
+ type instead of the original <code>std::size_t</code> (ticket
+ #3365).
+ <code>multi_index_container</code> serialization
+ class version has been
+ bumped from 0 to 1.
+ </li>
+</ul>
+</p>
+
 <h2><a name="boost_1_38">Boost 1.38 release</a></h2>
 
 <p>
@@ -263,9 +278,9 @@
 
 <br>
 
-<p>Revised November 10th 2008</p>
+<p>Revised September 3rd 2009</p>
 
-<p>&copy; Copyright 2003-2008 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
+<p>&copy; Copyright 2003-2009 Joaqu&iacute;n M L&oacute;pez Mu&ntilde;oz.
 Distributed under the Boost Software
 License, Version 1.0. (See accompanying file <a href="../../../LICENSE_1_0.txt">
 LICENSE_1_0.txt</a> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">


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