Re: [Boost-users] variant over base and derived classes

9 Dec
2010
9 Dec
'10
5:33 p.m.
I have a class hierarchy that I want to be able to mpi::broadcast. mpi::broadcast not being able to polymorphically receive the object on the receiver's end forced me to wrap all the hierarchy in a variant, which I can send and it works at reception as well. at reception, mpi::broadcast requires the real object to exist already. The code that sends with mpi::broadcast receives a base class reference (or pointer). The code that receives with mpi::broadcast doesn't know what it is receiving. Apparently, boost::serialization can deal with base pointers fine, and I think it creates on the heap the loaded objects, or? The solution w variant works here, I am trying to simplify. thanks,
5308
Age (days ago)
5308
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hicham Mouline