mirror of
https://github.com/boostorg/multi_index.git
synced 2025-05-11 05:14:05 +00:00
This commit is contained in:
parent
4753b325c5
commit
4d21e89621
@ -30,6 +30,7 @@ Acknowledgements
|
|||||||
<h2>Contents</h2>
|
<h2>Contents</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="#boost_1_68">Boost 1.68 release</a></li>
|
||||||
<li><a href="#boost_1_67">Boost 1.67 release</a></li>
|
<li><a href="#boost_1_67">Boost 1.67 release</a></li>
|
||||||
<li><a href="#boost_1_66">Boost 1.66 release</a></li>
|
<li><a href="#boost_1_66">Boost 1.66 release</a></li>
|
||||||
<li><a href="#boost_1_64">Boost 1.64 release</a></li>
|
<li><a href="#boost_1_64">Boost 1.64 release</a></li>
|
||||||
@ -57,6 +58,17 @@ Acknowledgements
|
|||||||
<li><a href="#boost_1_33">Boost 1.33 release</a></li>
|
<li><a href="#boost_1_33">Boost 1.33 release</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2><a name="boost_1_68">Boost 1.68 release</a></h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li>Containers of moveable but non-copyable elements can now be serialized
|
||||||
|
(ticket <a href="https://svn.boost.org/trac10/ticket/13478">#13478</a>).
|
||||||
|
Thanks to Sébastien Paris for the report.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
|
||||||
<h2><a name="boost_1_67">Boost 1.67 release</a></h2>
|
<h2><a name="boost_1_67">Boost 1.67 release</a></h2>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -572,7 +584,7 @@ Acknowledgements
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<p>Revised January 3rd 2018</p>
|
<p>Revised March 13th 2018</p>
|
||||||
|
|
||||||
<p>© Copyright 2003-2018 Joaquín M López Muñoz.
|
<p>© Copyright 2003-2018 Joaquín M López Muñoz.
|
||||||
Distributed under the Boost Software
|
Distributed under the Boost Software
|
||||||
|
@ -960,7 +960,7 @@ BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
|
|||||||
|
|
||||||
for(std::size_t n=0;n<s;++n){
|
for(std::size_t n=0;n<s;++n){
|
||||||
detail::archive_constructed<Value> value("item",ar,value_version);
|
detail::archive_constructed<Value> value("item",ar,value_version);
|
||||||
std::pair<node_type*,bool> p=insert_(
|
std::pair<node_type*,bool> p=insert_rv_(
|
||||||
value.get(),super::end().get_node());
|
value.get(),super::end().get_node());
|
||||||
if(!p.second)throw_exception(
|
if(!p.second)throw_exception(
|
||||||
archive::archive_exception(
|
archive::archive_exception(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* Boost.MultiIndex test for serialization, part 3.
|
/* Boost.MultiIndex test for serialization, part 3.
|
||||||
*
|
*
|
||||||
* Copyright 2003-2013 Joaquin M Lopez Munoz.
|
* Copyright 2003-2018 Joaquin M Lopez Munoz.
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
@ -11,6 +11,7 @@
|
|||||||
#include "test_serialization3.hpp"
|
#include "test_serialization3.hpp"
|
||||||
#include "test_serialization_template.hpp"
|
#include "test_serialization_template.hpp"
|
||||||
|
|
||||||
|
#include <boost/move/core.hpp>
|
||||||
#include <boost/multi_index/hashed_index.hpp>
|
#include <boost/multi_index/hashed_index.hpp>
|
||||||
#include <boost/multi_index/sequenced_index.hpp>
|
#include <boost/multi_index/sequenced_index.hpp>
|
||||||
#include <boost/multi_index/ordered_index.hpp>
|
#include <boost/multi_index/ordered_index.hpp>
|
||||||
@ -70,6 +71,36 @@ template<> struct version<non_default_ctble>
|
|||||||
} /* namespace serialization */
|
} /* namespace serialization */
|
||||||
} /* namespace boost*/
|
} /* namespace boost*/
|
||||||
|
|
||||||
|
struct non_copyable
|
||||||
|
{
|
||||||
|
non_copyable(int n_=0):n(n_){}
|
||||||
|
non_copyable(BOOST_RV_REF(non_copyable) x):n(x.n){}
|
||||||
|
|
||||||
|
bool operator==(const non_copyable& x)const{return n==x.n;}
|
||||||
|
bool operator<(const non_copyable& x)const{return n<x.n;}
|
||||||
|
|
||||||
|
int n;
|
||||||
|
|
||||||
|
private:
|
||||||
|
BOOST_MOVABLE_BUT_NOT_COPYABLE(non_copyable)
|
||||||
|
};
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||||
|
namespace boost{
|
||||||
|
namespace serialization{
|
||||||
|
#endif
|
||||||
|
|
||||||
|
template<class Archive>
|
||||||
|
void serialize(Archive& ar,non_copyable& x,const unsigned int)
|
||||||
|
{
|
||||||
|
ar&boost::serialization::make_nvp("n",x.n);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||||
|
} /* namespace serialization */
|
||||||
|
} /* namespace boost*/
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace boost::multi_index;
|
using namespace boost::multi_index;
|
||||||
|
|
||||||
void test_serialization3()
|
void test_serialization3()
|
||||||
@ -165,4 +196,21 @@ void test_serialization3()
|
|||||||
for(int i=0;i<100;++i)m.insert(non_default_ctble(i));
|
for(int i=0;i<100;++i)m.insert(non_default_ctble(i));
|
||||||
test_serialization(m);
|
test_serialization(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
/* testcase for https://svn.boost.org/trac10/ticket/13478 */
|
||||||
|
|
||||||
|
typedef multi_index_container<
|
||||||
|
non_copyable,
|
||||||
|
indexed_by<
|
||||||
|
ordered_unique<
|
||||||
|
BOOST_MULTI_INDEX_MEMBER(non_copyable,int,n)
|
||||||
|
>
|
||||||
|
>
|
||||||
|
> multi_index_t;
|
||||||
|
|
||||||
|
multi_index_t m;
|
||||||
|
for(int i=0;i<100;++i)m.insert(non_copyable(i));
|
||||||
|
test_serialization(m);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user