Boost logo

Boost :

Subject: Re: [boost] [Serialization] this seems wrong
From: Kenny Riddile (kfriddile_at_[hidden])
Date: 2008-12-02 17:08:38


Kenny Riddile wrote:
> Michael Marcin wrote:
>> Michael Marcin wrote:
>>> Michael Marcin wrote:
>>>> I don't know about getting rid of the unnamed namespace but
>>>> essentially we just need a unique name per type in a translation
>>>> unit.. so how about:
>>>>
>>>> #define BOOST_CLASS_EXPORT_GUID(T, K) \
>>>> namespace \
>>>> { \
>>>> template< typename U > \
>>>> class init_guid \
>>>> { \
>>>> static ::boost::archive::detail::guid_initializer<U> const & \
>>>> guid_initializer_; \
>>>> }; \
>>>> template<> ::boost::archive::detail::guid_initializer<T> const & \
>>>> init_guid<T>::guid_initializer_ = \
>>>> ::boost::serialization::singleton< \
>>>> ::boost::archive::detail::guid_initializer<T> \
>>>> >::get_mutable_instance().export_guid(K); \
>>>> }
>>>>
>>>
>>> Do we still need to explicitly instantiate init_guid here? If so add
>>>
>>> template class init_guid<T>;
>>>
>>
>> Never mind this fails if we have 2 export macros.. silly me.
>>
> I'm thinking I may just call BOOST_CLASS_EXPORT_GUID directly instead of
> BOOST_CLASS_EXPORT to get around this problem.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Oops, that obviously wouldn't work. I've been staring at modified code
so long in trying to fix the issue, that I had forgotten where the
__LINE__ directive was originally being used :)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk