Hi all,
I have some trouble with the Boost.Serialization library. I have
compiled the 'demo.cpp' example, and now I am trying to distill it a
little, so that I can understand how to apply it to my own polymorphic
class hierarchy. However I keep seeing the same error message, and can't
work out what it means.
In /usr/include/boost/archive/detail/oserializer.hpp:567 there are some
comments about the error message I'm seeing but I don't understand what
those comments mean. I'm using Boost 1.33.1-7ubuntu1 on Ubuntu 6.10.
Any help would be much appreciated!
Cheers
JP
Here is the error message:
--------------8<---------------
jpye@john:~/boosttest$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o ser1.o -c ser1.cpp
/usr/include/boost/archive/detail/oserializer.hpp: In function 'void
boost::archive::save(Archive&, T&) [with Archive =
boost::archive::text_oarchive, T = dd]':
/usr/include/boost/archive/basic_text_oarchive.hpp:78: instantiated
from 'void
boost::archive::basic_text_oarchive<Archive>::save_override(T&, int)
[with T = dd, Archive = boost::archive::text_oarchive]'
/usr/include/boost/archive/detail/interface_oarchive.hpp:78:
instantiated from 'Archive&
boost::archive::detail::interface_oarchive<Archive>::operator<<(T&)
[with T = dd, Archive = boost::archive::text_oarchive]'
ser1.cpp:43: instantiated from here
/usr/include/boost/archive/detail/oserializer.hpp:567: error: invalid
application of 'sizeof' to incomplete type
'boost::STATIC_ASSERTION_FAILURE<false>'
scons: *** [ser1.o] Error 1
scons: building terminated because of errors.
jpye@john:~/boosttest$
--------------------------------------
Here is the code that was being compiled:
-----------------8<---------------
jpye@john:~/boosttest$ cat ser1.cpp
#include <iomanip>
#include <iostream>
#include <fstream>
#include <string>
#include