
On Tue, May 10, 2011 at 8:57 AM, Robert Ramey
Jari wrote:
Hi I am using boost serialization and it was working fine (save load works) but then I tried using BOOST_CLASS_EXPORT_GUID and get weird error.
The line that gives the error is this:
BOOST_CLASS_EXPORT_GUID( Bakery, "Bakery")
(I put the code in Cpp to avoid any problems with headers.)
And this is the full Visual studio express 2010 error:
2>E:\boost_1_46_1\boost/archive/detail/check.hpp(162): error C2338: typex::value
...
what does the code look like at line 162 of check.hpp ?
Robert Ramey
Here's part of check.hpp where the problem is: template<class T> inline void check_const_loading(){ typedef BOOST_DEDUCED_TYPENAME mpl::or_< BOOST_DEDUCED_TYPENAME boost::serialization::is_wrapper< T >, BOOST_DEDUCED_TYPENAME mpl::not_< BOOST_DEDUCED_TYPENAME boost::is_const< T > > >::type typex; // cannot load data into a "const" object unless it's a // wrapper around some other non-const object. BOOST_STATIC_ASSERT(typex::value); // <------------- Compiler points here for the error } } // detail } // archive } // boost I must also say that I got all the code working in small test project but this error comes up in my big project.