On Friday, March 9, 2007 at 11:47:21 (-0800) Robert Ramey writes:
Second I would make this a "helper class" . Your special "Lear Archive" would be derived from an existing archive and the helper class using multiple inheritance. Look at the implemenation of shared_ptr checked into the HEADof CVS to see how to do this. ...
I checked out the head of CVS, but did not see anything relating
to a helper class in shared_ptr.hpp. Not sure if I'm looking
in the right place. This is how I checked it out:
% cvs -z3 -d:pserver:anonymous@boost.cvs.sourceforge.net:/cvsroot/boost checkout boost
I'm not sure I need to use a cache of strings when saving, in fact,
I think not, but I went ahead and more-or-less followed your
instructions.
I can't seem to get this to compile, but it's getting closer.
The complete code is below my sig.
The compiler (gcc) complains:
error: 'class boost::archive::text_iarchive' has no member named 'cache'
error: 'class boost::archive::text_oarchive' has no member named 'cache'
So, it seems text_iarchive is being used as the type in the
load method, instead of ll_text_iarchive, which I guess makes sense,
but I'm not really sure how to cast to the proper archive, or if
that's even a good idea.
Also, for some reason, I can't use this idiom:
ar << ll_string(s);
In fact, this won't work, either:
ar << string("foo");
for some reason.
Finally, I really have no idea how to use the reset_object_address()
method. I looked through the boost code, but couldn't decipher it.
Any help appreciated.
Bill
#include <iostream>
#include <string>
#include <fstream>
#include <set>
#include