]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpi/test/pointer_test.cpp
1 // Copyright (C) 2005, 2006 Douglas Gregor.
3 // Use, modification and distribution is subject to the Boost Software
4 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
8 // a test of pointer serialization
9 #include <boost/mpi.hpp>
10 #include <boost/test/minimal.hpp>
11 #include <boost/serialization/shared_ptr.hpp>
17 template<class Archive
>
18 void serialize(Archive
& ar
, const unsigned int version
)
24 int test_main(int argc
, char* argv
[])
26 boost::mpi::environment
env(argc
, argv
);
27 boost::mpi::communicator world
;
31 boost::shared_ptr
<A
> p(new A
);
35 else if(world
.rank() == 1)
37 boost::shared_ptr
<A
> p
;
39 std::cout
<< p
->i
<< std::endl
;
40 BOOST_CHECK(p
->i
==42);