Sascha Friedmann wrote:
Hello, I have a problem with serializing smart_ptrs. I have tried both the boost::scoped_ptr and the boost::shared_ptr but I get always the same error:
Boost1-33\include\boost-1_33\boost\archive\detail\oserializer.hpp(566): error C2027: Use of undefined type "boost::STATIC_ASSERTION_FAILURE<x>" with [ x=false ]
int main( int argc, char* argv[] )
{
**** replace the following
Test t;
with const Test t;
std::ofstream ofs( "test.txt" );
boost::archive::text_oarchive out( ofs );
out << t;
}
I hope someone can help me (google and the documentation couldn't :()
This is explained in couple of places: a) The code comment at the point where the compile time error occurs gives and explanation and points to more information. b) The Rationale section of the documentation explains this in detail and why this is trapped.
Sascha Friedmann