Serialization library build problems

When I try to compile an application that uses the Boost serialization library,
I get some compilation errors that I don't understand.
I've taken the code, and trimmed it down to the simplest possible case that
produces the same error.
Here's the code:
// Test of Boost serialization library
#include <sstream>
#include

See below - Robert Ramey Dominick Layfield wrote:
When I try to compile an application that uses the Boost serialization library, I get some compilation errors that I don't understand.
I've taken the code, and trimmed it down to the simplest possible case that produces the same error.
Here's the code:
// Test of Boost serialization library #include <sstream> #include
class test_t { public: int i; template <class Archive> void serialize(Archive& ar, const unsigned int version ) { ar & i; } test_t(int _i) : i(_i) {}; };
int main(void) { std::ostringstream oss; boost::archive::text_oarchive oa(oss); // test_t test(1); const test_t t; // try this - see rational for explanation oa << test; return 0; }
participants (2)
-
Dominick Layfield
-
Robert Ramey