Boost logo

Boost Users :

Subject: [Boost-users] [boost] [serialization] Braking change with BOOST_CLASS_EXPORT
From: petke himself (petke_at_[hidden])
Date: 2010-10-19 08:56:38


Hi,
 
I noticed a breaking change / bug with boost serialization. (I hope this is the right mailinglist for bug reports)
 
Upgrading from boost-1.35.0 to boost_1_44_0.. and I got compilation errors with the BOOST_CLASS_EXPORT macro. I did not write the user code so i dont know anything about the library, but it turns out BOOST_CLASS_EXPORT was called from inside several user namespaces. This meant the macro would try and specialize the template 'somens1::somens2::somens3::boost::serialization::guid_defined', which obviously does not exist. Placing the BOOST_CLASS_EXPORT macro outside of any user namespace solved the compile error. Im not sure why this worked in the old version of boost. But maybe it would be an idea to change the BOOST_CLASS_EXPORT macro, if possible, so that it jumps back into the root namespace. Should be as simple as replacing any "boost::serialization" with "::boost::serialization", right?
 
The error message on VS2008 was:
     [exec] 1>xxx.h(67) : error C2143: syntax error : missing ';' before '<'
     [exec] 1>xxx.h(67) : error C2913: explicit specialization; 'somens1::somens2::somens3::boost::serialization::guid_defined' is not a specialization of a class template
     [exec] 1>xxx.h(67) : error C2059: syntax error : '<'
     [exec] 1>xxx.h(67) : error C3083: 'mpl': the symbol to the left of a '::' must be a type
     [exec] 1>xxx.h(67) : error C2039: 'true_' : is not a member of 'somens1::somens2::somens3::boost'
     [exec] 1>xxx.h(67) : error C2470: 'true_' : looks like a function definition, but there is no parameter list; skipping apparent body
     [exec] 1>xxx.h(67) : fatal error C1903: unable to recover from previous error(s); stopping compilation

Regards, Patrik
                                               



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