Opened 12 years ago
Closed 12 years ago
#4981 closed Patches (wontfix)
Boost.Archive No Tracking does nothing
Reported by: | 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)
Change History (4)
by , 12 years ago
Attachment: | archive-tracking.patch added |
---|
comment:1 by , 12 years ago
Type: | Feature Requests → Patches |
---|
comment:2 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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
patch to enable no_tracking option