Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-05-27 22:48:51


This is not a problem with your serialization function. But somewhere else.
Note the section in the manual under "tracking" addresses this. This
describes requirements re const-ness that were documented but only recently
enforced.

Robert Ramey

Neal Becker wrote:
> This used to work with 1.32.0, but is failing with cvs.
>
> In mersenne_twister.hpp, I add
> template<class Archive>
> void serialize(Archive & ar, const unsigned int version)
> {
> ar & x;
> ar & i;
> }
>
> Now compile:
> g++4 -g -DNDEBUG -O3 -ftree-vectorize -msse2 -ffast-math
> -fstrict-aliasing -Wall -fPIC -I/usr/local/src/boost.cvs
> -I/usr/include/python2.4 -I/home/\ nbecker/shannon2.darcs/src -c -o
> boost_rand.os boost_rand.cc
> /usr/local/src/boost.cvs/boost/archive/detail/oserializer.hpp: In
> function 'void boost::archive::save(Archive&, T&) [with Archive =
> boost::archive:\
>> binary_oarchive, T = boost::random::mersenne_twister<uint32_t, 32,
>> 624,
> 397, 31, 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18,
> 3346425566u\
>> ]':
> /usr/local/src/boost.cvs/boost/archive/basic_binary_oarchive.hpp:69:
> instantiated from 'void
> boost::archive::basic_binary_oarchive<Archive>::save\
> _override(T&, int) [with T =
> boost::random::mersenne_twister<uint32_t, 32, 624, 397, 31,
> 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18, 3346\ 425566u>,
> Archive = boost::archive::binary_oarchive]'
> /usr/local/src/boost.cvs/boost/archive/binary_oarchive.hpp:47:
> instantiated from 'void
> boost::archive::binary_oarchive_impl<Archive>::save_overri\
> de(T&, int) [with T = boost::random::mersenne_twister<uint32_t, 32,
> 624, 397, 31, 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18,
> 3346425566u\
>> , Archive = boost::archive::binary_oarchive]'
> /usr/local/src/boost.cvs/boost/archive/detail/interface_oarchive.hpp:89:
> instantiated from 'Archive&
> boost::archive::detail::interface_oarchive<A\ rchive>::operator<<(T&)
> [with T = boost::random::mersenne_twister<uint32_t, 32, 624, 397, 31,
> 2567483615u, 11, 7, 2636928640u, 15, 4022730752u, 18,\ 3346425566u>,
> Archive = boost::archive::binary_oarchive]'
> boost_rand.cc:41: instantiated from here
> /usr/local/src/boost.cvs/boost/archive/detail/oserializer.hpp:557:
> error: invalid application of 'sizeof' to incomplete type
> 'boost::STATIC_ASSERTI\ ON_FAILURE<false>'
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk