boost::serialization warnings for template class

Dear Boost experts,
I'm serializing (intrusively) a template class Matrix<T> that includes a
double-pointer buffer of data of type T. So my save/load pair looks like
template<class Archive> void save(Archive & ar, const unsigned int
version) const {
ar & row_dim;
ar & col_dim;
for ( size_t i = 0; i < row_dim; i++ )
for ( size_t j = 0; j < col_dim; j++ ) {
ar & value[i][j];
}
}
template<class Archive> void load(Archive & ar, const unsigned int
version) {
size_t rowdim, coldim;
ar & rowdim;
ar & coldim;
resize( rowdim, coldim );
for ( size_t i = 0; i < rowdim; i++ )
for ( size_t j = 0; j < coldim; j++ )
ar & value[i][j];
}
The type of value is T**. The serialization works OK, but I'm getting some
warnings that lead me to suspect that Boost is trying to track the
addresses of the value[i][j] elements, which is not needed, and presumably
a problem for performance.
g++ -c -m64 -O3 -Wall -I../../include
-I/usr/depot/redhatel5_64/boost/1.48.0/include -o
Linux-x86_64/obj/test_Matrix.o test_Matrix.cpp
/usr/depot/redhatel5_64/boost/1.48.0/include/boost/mpl/print.hpp: In
instantiation of
'boost::mpl::print
':
/usr/depot/redhatel5_64/boost/1.48.0/include/boost/serialization/static_warning.hpp:92:
instantiated from 'boost::serialization::static_warning_test
participants (1)
-
Michele Vallisneri