|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2006-09-17 15:12:23
I've been looking at this issue. It turns out that the connection of
serialization
of pointers to primitives to tracking was an unintentional side-effect
of the implementation. When it started to happen I just assumed it
was an intentional decision. Looking through the code - it doesn't look
trivial to address. Wouldn't the following modification to your test
program address your concern?
Robert Ramey
#include <boost/archive/text_oarchive.hpp>
#include <sstream>
namespace boost {
namespace serialization {
template<class Archive>
void serialize(
Archive &ar,
int & i,
const unsigned int file_version
){
ar & i;
};
}}
int main()
{
int x=0;
int* const px=&x;
std::ostringstream oss;
boost::archive::text_oarchive oa(oss);
oa<<px;
return 0;
}
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net