
AMDG On 2/16/2011 5:26 AM, John Reid wrote:
Digging a bit deeper in the boost code I found the undefined symbol in boost/serialization/version.hpp:
// default version number is 0. Override with higher version // when class definition changes. template<class T> struct version { template<class U> struct traits_class_version { typedef BOOST_DEDUCED_TYPENAME U::version type; };
typedef mpl::integral_c_tag tag; // note: at least one compiler complained w/o the full qualification // on basic traits below typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< is_base_and_derivedboost::serialization::basic_traits,T, traits_class_version<T>, mpl::int_<0>
::type type; BOOST_STATIC_CONSTANT(int, value = version::type::value); };
Perhaps BOOST_STATIC_CONSTANT isn't working here?
This is missing something important: #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION template<class T> int version<T>::value; #endif Can you file a trac ticket at http://svn.boost.org/
I know it seems a bit unlikely. I've tried explicitly instantiating the template and defining the symbol myself but I can't seem to get any of these approaches to work. Why it would work in release mode but not debug is also a mystery to me.
Because it's a constant, it must be getting optimized out in release mode. In Christ, Steven Watanabe