|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r57689 - sandbox/statistics/detail/multi_array/libs/statistics/detail/multi_array/example
From: erwann.rogard_at_[hidden]
Date: 2009-11-15 14:30:10
Author: e_r
Date: 2009-11-15 14:30:09 EST (Sun, 15 Nov 2009)
New Revision: 57689
URL: http://svn.boost.org/trac/boost/changeset/57689
Log:
m
Text files modified:
sandbox/statistics/detail/multi_array/libs/statistics/detail/multi_array/example/serialize.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
Modified: sandbox/statistics/detail/multi_array/libs/statistics/detail/multi_array/example/serialize.cpp
==============================================================================
--- sandbox/statistics/detail/multi_array/libs/statistics/detail/multi_array/example/serialize.cpp (original)
+++ sandbox/statistics/detail/multi_array/libs/statistics/detail/multi_array/example/serialize.cpp 2009-11-15 14:30:09 EST (Sun, 15 Nov 2009)
@@ -13,6 +13,7 @@
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/statistics/detail/multi_array/serialization/serialize.hpp>
+#include <boost/serialization/serialization.hpp>
//#include <boost/serialization/vector.hpp>
#include <libs/statistics/detail/multi_array/example/serialize.h>
@@ -32,6 +33,7 @@
typedef boost::multi_array<val_, 2> array_;
typedef std::vector<array_> vec_array_;
typedef boost::array<ma::multi_array_base::index,2> extents_;
+ const unsigned int v = 0; // should call the overload (default is unsigned long)
const unsigned n0 = 2;
const unsigned n1 = 2;
const str_ path = "./multi_array_serialization";
@@ -47,10 +49,10 @@
a[i][j] = i * n1 + j;
}
}
- boost::serialization::save(oa,a,0);
+ boost::serialization::save(oa,a,v);
// Neither of these compiles:
- // boost::serialization::serialize(oa,a,0);
+ boost::serialization::serialize_adl(oa,a,v);
// oa << a;
}
{
@@ -58,9 +60,9 @@
ia_ ia(ifs);
array_ a;
// Neither of these compiles:
- // boost::serialization::serialize(ia,a,0);
+ // boost::serialization::serialize(ia,a,v);
// ia >> a;
- boost::serialization::load(ia,a,0);
+ boost::serialization::load(ia,a,v);
for(unsigned i = 0; i<n0; i++)
{
for(unsigned j = 0; j<n1; j++)
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