Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Undefined symbol
From: John Reid (j.reid_at_[hidden])
Date: 2011-02-16 11:34:06


On 16/02/11 15:46, Steven Watanabe wrote:
> 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_derived<boost::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/
Have done:
https://svn.boost.org/trac/boost/ticket/5196

John.


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