mirror of
https://github.com/boostorg/multi_index.git
synced 2025-05-09 23:14:04 +00:00
merged [55994] and [55995] from trunk
[SVN r56111]
This commit is contained in:
parent
180f64dc11
commit
718559b87f
@ -31,6 +31,7 @@ Acknowledgements
|
||||
<h2>Contents</h2>
|
||||
|
||||
<ul>
|
||||
<li><a href="#boost_1_41">Boost 1.41 release</a></li>
|
||||
<li><a href="#boost_1_38">Boost 1.38 release</a></li>
|
||||
<li><a href="#boost_1_37">Boost 1.37 release</a></li>
|
||||
<li><a href="#boost_1_36">Boost 1.36 release</a></li>
|
||||
@ -40,6 +41,20 @@ Acknowledgements
|
||||
<li><a href="#boost_1_33">Boost 1.33 release</a></li>
|
||||
</ul>
|
||||
|
||||
<h2><a name="boost_1_41">Boost 1.41 release</a></h2>
|
||||
<p>
|
||||
<ul>
|
||||
<li>Serialization now uses the portable
|
||||
<a href="../../serialization/doc/wrappers.html#collection_size_type"><code>collection_size_type</code></a>
|
||||
type instead of the original <code>std::size_t</code> (ticket
|
||||
<a href="https://svn.boost.org/trac/boost/ticket/3365">#3365</a>).
|
||||
<code>multi_index_container</code> serialization
|
||||
<a href="../../serialization/doc/tutorial.html#versioning">class version</a> 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 @@ Acknowledgements
|
||||
|
||||
<br>
|
||||
|
||||
<p>Revised November 10th 2008</p>
|
||||
<p>Revised September 3rd 2009</p>
|
||||
|
||||
<p>© Copyright 2003-2008 Joaquín M López Muñoz.
|
||||
<p>© Copyright 2003-2009 Joaquín M López Muñ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">
|
||||
|
@ -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 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
|
||||
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 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
|
||||
|
||||
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 @@ void swap(
|
||||
|
||||
} /* 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.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user