id summary reporter owner description type status milestone component version severity resolution keywords cc 2544 BOOST_CLASS_EXPORT uses __LINE__ in variable declaration Emmet Spier Robert Ramey "Bug --- Using boost serialization. Declaring various derived types in separate files. Each type has a corresponding: BOOST_CLASS_EXPORT or BOOST_CLASS_EXPORT_GUID Have two or more files with the BOOST_CLASS_EXPORT/_GUID on the SAME line. Obtain a compile ""error C2371: '`anonymous-namespace'::boost_serialization_guid_initializer_29' : redefinition; different basic types"" Diagnosis --------- Since (at least) boost 1.36 (not boost 1.34) in 'serialization/export.hpp' in the macro definition of BOOST_CLASS_EXPORT_GUID a variable is defined as so: BOOST_PP_CAT(boost_serialization_guid_initializer_, __LINE__) = ::boost::serialization::singleton< ... Clearly, by using __LINE__ every call to the macro *must be on a different line*, otherwise an error as above will occur. Proposed Solution ----------------- I can't say that I know the ins and outs of boost too well but if '__LINE__' is replaced by 'T' -- a variable in the macro specifying the classname -- then the generated variable name will be guaranteed to be unique (and valid?) " Bugs closed Boost 1.38.0 serialization Boost Development Trunk Showstopper fixed boost >= 1.36