Opened 12 years ago

Closed 12 years ago

#4981 closed Patches (wontfix)

Boost.Archive No Tracking does nothing

Reported by: jsternberg <jonathansternberg@…> Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.45.0 Severity: Problem
Keywords: Cc:

Description

I see from a very old e-mail that the no_tracking option for archives was planned:

http://lists.boost.org/Archives/boost/2005/03/81549.php

And then I can see work was stopped. The author of this e-mail says it was for "multiple reasons he can't remember."

http://lists.boost.org/Archives/boost/2006/04/103291.php

This feature would be very helpful for those who need to serialize a pointer off the stack. The attached code sample introduces a situation where the no_tracking option would be helpful.

Attached is a patch that enabled the use of boost::archive::no_tracking as a flag for the archive.

Attachments (2)

archive-tracking.patch (2.4 KB ) - added by jsternberg <jonathansternberg@…> 12 years ago.
patch to enable no_tracking option
serialize.cpp (2.6 KB ) - added by jsternberg <jonathansternberg@…> 12 years ago.
example showing the problem

Download all attachments as: .zip

Change History (4)

by jsternberg <jonathansternberg@…>, 12 years ago

Attachment: archive-tracking.patch added

patch to enable no_tracking option

by jsternberg <jonathansternberg@…>, 12 years ago

Attachment: serialize.cpp added

example showing the problem

comment:1 by Vicente Botet <vicente.botet@…>, 12 years ago

Type: Feature RequestsPatches

comment:2 by Robert Ramey, 12 years ago

Resolution: wontfix
Status: newclosed

For serializing a pointer off the stack, one might better just de-reference the pointer and just serialize the object: e.g.

my_object *p = ...

ar & *p

The fix suggested would need to be looked at with excruciating detail to be sure it doesn't break anything else. Not a good idea.

I am aware of the need to be able to suppress tracking on a case by case basis but I don't think this is a good way to do it.

Robert Ramey

Note: See TracTickets for help on using tickets.