Boost logo

Boost Users :

Subject: [Boost-users] boost serialisation, just including shared_ptr.hpp causes compile error on Linux/gcc 4.5
From: avib369 . (avibahra_at_[hidden])
Date: 2014-08-18 10:59:12


I did not see boost serialisation in the list of lib that had changed. So
its
surprising that it now broken ?

It appears simply including it cause problems

#include <boost/serialization/shared_ptr.hpp>

cause

gcc.compile.c++ bin/gcc-4.5/debug/test/TestStr.o
In file included from
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr.hpp:28:0,
                 from test/TestStr.cpp:27:
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:
In static member function ‘static const
boost::serialization::extended_type_info*
boost::serialization::shared_ptr_helper<SPT>::non_polymorphic::get_object_type(U&)’:
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:107:22:
error: ‘singleton’ is not a member of ‘boost::serialization’
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:110:13:
error: expected ‘(’ before ‘>’ token
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:110:14:
error: ‘::get_const_instance’ has not been declared
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:
In static member function ‘static const
boost::serialization::extended_type_info*
boost::serialization::shared_ptr_helper<SPT>::polymorphic::get_object_type(U&)’:
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:117:20:
error: ‘singleton’ is not a member of ‘boost::serialization’
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:120:13:
error: expected ‘(’ before ‘>’ token
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:120:14:
error: ‘::get_const_instance’ has not been declared
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:
In member function ‘void
boost::serialization::shared_ptr_helper<SPT>::reset(SPT<T>&, T*)’:
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:152:30:
error: invalid use of incomplete type ‘const struct
boost::serialization::extended_type_info’
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:42:7:
error: forward declaration of ‘const struct
boost::serialization::extended_type_info’
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:167:30:
error: invalid use of incomplete type ‘const struct
boost::serialization::extended_type_info’
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:42:7:
error: forward declaration of ‘const struct
boost::serialization::extended_type_info’
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:168:30:
error: invalid use of incomplete type ‘const struct
boost::serialization::extended_type_info’
/var/tmp/ma0/boost/boost_1_56_0/boost/serialization/shared_ptr_helper.hpp:42:7:
error: forward declaration of ‘const struct
boost::serialization::extended_type_info’

    "g++" -ftemplate-depth-128 -fPIC -O0 -fno-inline -Wall -g -fPIC
-DDEBUG -I"../ACore/src" -I"/var/tmp/ma0/boost/boost_1_56_0" -c -o
"bin/gcc-4.5/debug/test/TestStr.o" "test/TestStr.cpp"

Are there any workarounds ?

Ta,
   Avi



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net