Open MerrillCornish opened 9 years ago
This seemed impossible or excruciatingly hard at best on Boost.Serialization so I'm trying out cereal instead, but looking at this issue, it doesn't seem to support it out of the box either. But I'm guessing cereal would be considerably easier to extend than Boost.Serialization. Has someone else tried use use custom allocators/deleters with cereal ?
When cereal serializes smart pointers, it takes no notice of whether that object has a custom deleter or allocator. That means than when a smart pointer with non-default deleter or allocator is de-serialized, it's not going to behave the same as the original version.
At a minimum, cereal should raise an exception if a smart pointer with non-default deleter or allocator is submitted for serialization.
A similar problem exists with STL containers. Most (all?) of them allow customer allocators. So they should raise an exception also.