Boost logo

Boost Users :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2007-07-18 22:52:47


This should also be fixed in the current CVS version. Can you check?

On 6 Jul 2007, at 04:56, Andras Joo wrote:

> Dear All,
> I have encountered a problem I cannot go through
> regarding boost::mpi and shared_ptr.
>
> Please consider the following code:
>
> class Foo
> {
> friend class boost::serialization::access;
> template<class Archive>
> void serialize(Archive &ar, const unsigned int
> version)
> {
> //...
> }
> };
>
> //...
> mpi::communicator world;
> boost::shared_ptr<Foo> pFoo;
>
> if (world.rank() == 0)
> pFoo = boost::shared_ptr<Foo>(new Foo);
>
> mpi::broadcast(world, pFoo, 0);
> //...
>
> Now unfortunately this doesn't compile, I get the
> following error message:
>
> /home/jooam/usr/include/boost-1_35/boost/serialization/shared_ptr.hpp:
> In function 'void boost::serialization::load(Archive&,
> boost::shared_ptr<U>&, unsigned int) [with Archive =
> boost::mpi::packed_iarchive, T = Foo]':
> /home/jooam/usr/include/boost-1_35/boost/serialization/
> split_free.hpp:58:
> instantiated from 'static void
> boost::serialization::free_loader<Archive,
> T>::invoke(Archive&, T&, unsigned int) [with Archive =
> boost::mpi::packed_iarchive, T =
> boost::shared_ptr<Foo>]'
> /home/jooam/usr/include/boost-1_35/boost/serialization/
> split_free.hpp:74:
> instantiated from 'void
> boost::serialization::split_free(Archive&, T&,
> unsigned int) [with Archive =
> boost::mpi::packed_iarchive, T =
> boost::shared_ptr<Foo>]'
> /home/jooam/usr/include/boost-1_35/boost/serialization/
> shared_ptr.hpp:152:
> instantiated from 'void
> boost::serialization::serialize(Archive&,
> boost::shared_ptr<U>&, unsigned int) [with Archive =
> boost::mpi::packed_iarchive, T = Foo]'
> /home/jooam/usr/include/boost-1_35/boost/serialization/
> serialization.hpp:140:
> instantiated from 'void
> boost::serialization::serialize_adl(Archive&, T&,
> unsigned int) [with Archive =
> boost::mpi::packed_iarchive, T =
> boost::shared_ptr<Foo>]'
> /home/jooam/usr/include/boost-1_35/boost/archive/detail/
> iserializer.hpp:161:
> instantiated from 'void
> boost::archive::detail::iserializer<Archive,
> T>::load_object_data(boost::archive::detail::basic_iarchive&,
> void*, unsigned int) const [with Archive =
> boost::mpi::packed_iarchive, T =
> boost::shared_ptr<Foo>]'
> /home/jooam/evolearn/src/evolearn.cpp:75:
> instantiated from here
> /home/jooam/usr/include/boost-1_35/boost/serialization/
> shared_ptr.hpp:137:
> error: 'class boost::mpi::packed_iarchive' has no
> member named 'reset'
>
>
> Could you tell me please, what I'm doing wrong? I
> would appreciate any help.
>
> Have a nice day,
> Andras
>
>
>
> ______________________________________________________________________
> ______________
> Don't get soaked. Take a quick peak at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net