id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7474,compilation error in boost::serialization,Like Gao ,Robert Ramey,"Error: passing 'const ... discards qualifiers' Related File: /opt/local/include/boost/serialization/split_member.hpp Root cause: In /opt/local/include/boost/serialization/split_member.hpp: calling access::member_save() with a ""const & T"" {{{ template struct member_saver { static void invoke( Archive & ar, const T & t, const unsigned int file_version ){ access::member_save(ar, t, file_version); ^^ t is ""const T&"" } }; }}} But in the called, parameter t is not expecting ""const"". See file /opt/local/include/boost/serialization/access.hpp: {{{ // pass calls to users's class implementation template static void member_save( Archive & ar, //const T & t, T & t, const unsigned int file_version ){ t.save(ar, file_version); } }}} Error trace: * Invoking: GCC C++ Compiler * g++ -DOS_MACOSX -I/opt/local/gtest/include -I../third_party/leveldb-1.5.0/include -I../third_party/leveldb-1.5.0 -I/opt/local/include -I../src/server/cse -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF""test/server/cse/bucket_addcells.d"" -MT""test/server/cse/bucket_addcells.d"" -o ""test/server/cse/bucket_addcells.o"" ""../test/server/cse/bucket_addcells.cpp"" * /opt/local/include/boost/serialization/access.hpp: In static member function 'static void boost::serialization::access::member_save(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = const cse::SortedBucket]': * /opt/local/include/boost/serialization/split_member.hpp:43: instantiated from 'static void boost::serialization::detail::member_saver::invoke(Archive&, const T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = cse::SortedBucket]' * /opt/local/include/boost/serialization/split_member.hpp:70: instantiated from 'void boost::serialization::split_member(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = cse::SortedBucket]' * ../src/server/cse/io/sorted.hpp:56: instantiated from 'void cse::SortedBucket::serialize(Archive&, unsigned int) [with Archive = boost::archive::text_oarchive, KEY = int, VAL = float]' * /opt/local/include/boost/serialization/access.hpp:118: instantiated from 'static void boost::serialization::access::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = cse::SortedBucket]' * /opt/local/include/boost/serialization/serialization.hpp:69: instantiated from 'void boost::serialization::serialize(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = cse::SortedBucket]' * /opt/local/include/boost/serialization/serialization.hpp:128: instantiated from 'void boost::serialization::serialize_adl(Archive&, T&, unsigned int) [with Archive = boost::archive::text_oarchive, T = cse::SortedBucket]' * /opt/local/include/boost/archive/detail/oserializer.hpp:148: instantiated from 'void boost::archive::detail::oserializer::save_object_data(boost::archive::detail::basic_oarchive&, const void*) const [with Archive = boost::archive::text_oarchive, T = cse::SortedBucket]' ../test/server/cse/bucket_addcells.cpp:63: instantiated from here * /opt/local/include/boost/serialization/access.hpp:93: error: passing 'const cse::SortedBucket' as 'this' argument of 'void cse::SortedBucket::save(Archive&, unsigned int) [with Archive = boost::archive::text_oarchive, KEY = int, VAL = float]' discards qualifiers",Bugs,closed,To Be Determined,serialization,Boost Release Branch,Problem,invalid,,