Hi,
I've inherited some complex math code that makes large usage of Matrices
based on raw pointer arrays. I need to serialize/deserialize these arrays
as is and am looking to use boost::serialization package. My attempt at
doing so results in the following errors (mostly about non integral array
size). As I do not know the array size when it is created (and lots of code
accesses the pointer directly as a chunk of memory that has been allocated,
what are my options to get this to work?
Errors:
/usr/include/boost/archive/detail/oserializer.hpp: In function `void
boost::archive::save(Archive&, T&) [with Archive =
boost::archive::text_oarchive, T = Dummy]':
/usr/include/boost/archive/basic_text_oarchive.hpp:78: instantiated from
`void boost::archive::basic_text_oarchive<Archive>::save_override(T&, int)
[with T = Dummy, 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
= Dummy, Archive = boost::archive::text_oarchive]'
serialize_array.cpp:56: instantiated from here
/usr/include/boost/archive/detail/oserializer.hpp:567: error: incomplete
type `boost::STATIC_ASSERTION_FAILURE< false>' used in nested name specifier
/usr/include/boost/archive/detail/oserializer.hpp:567: error: size of array
has non-integral type `<type error>'
Code:
#include