
28 Oct
2011
28 Oct
'11
5:41 p.m.
On 10/28/2011 01:09 AM, Robert Ramey wrote:
James Amundson wrote:
I am trying to use Boost Serialization with a set of classes which contain handles to opaque objects written in C. (Specifically, the objects are MPI communicator objects and the handles are of the MPI_Comm type, but I don't think that's important for the problem.) This is easy to do.
Great. That's the kind of answer I was looking for.
I'mplement serialization for your object.
Use shared_ptr for your opaque handle. The smart pointer library has examples on how to do this.
serialize the resulting smart pointer.
Ah, I see. I was looking for a serialization-specific solution. Shared_ptr makes perfect sense. Thanks, Jim