Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-12-15 23:22:13


see comments below:

Merrill Cornish wrote:
> I tried this:
>
> . . .
> {
> ofstream outStream(archiveFile);
> boost::archive::xml_oarchive outArchive(outStream);
> outArchive << testObj_out;
> } // archive and stream closed when destructors are called
> . . .
>

Look in the manual under Tutorial/List of Examples for pointers to special
considerations regarding XML.

...
> E:/Dev-Cpp/Workflow/boost/include/boost/archive/basic_xml_oarchive.hpp:86:
> error: incomplete type `boost::STATIC_ASSERTION_FAILURE< false>'
> used in nested name specifier

When you get a STATIC_ASSERTION_FAILURE look in the code where the failure
occurs to find a comment on probable cause of the error. In this case you
will find;

// Anything not an attribute and not a name-value pair is an
// error and should be trapped here.
template<class T>
void save_override(T & t, BOOST_PFTO int)
{
// If your program fails to compile here, its most likely due to
// not specifying an nvp wrapper around the variable to
// be serialized.
BOOST_STATIC_ASSERT(0 == sizeof(T));
}

Which points to the manual (nvp wrappers) indicating how to fix the problem.

Robert Ramey


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