Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-05-19 10:33:41


Marcin Tustin wrote:
> I've been looking through the template instantiation trace, and I
> can't figure out where the choice to use the intrusive mechanism is
> made. I'll
> keep looking a little more, and I've appended the trace below:
>
> ------ Build started: Project: NewClient, Configuration: Debug Win32
> ------
>
> Compiling...
> EnhancedMessageHandler.cpp
> c:\D2\API\NewClient\EnhancedMessageHandler.cpp(151) : warning C4244:
> '='
>> conversion from 'uintptr_t' to 'unsigned long', possible loss of data
> c:\new_boost\boost\boost\serialization\access.hpp(107) : error C2039:
> 'serialize' : is not a member of 'Jrs::SmartPtr<T>'
> with
> [
> T=D2::Message
> ]
> c:\new_boost\boost\boost\serialization\serialization.hpp(81) :
> see reference to function template instantiation 'void
> boost::serialization::access::serialize<Archive,T>(Archive &,T &,const
> unsigned int)' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=const D2::MessagePtr
> ]
> c:\new_boost\boost\boost\serialization\serialization.hpp(140)
> :
> see reference to function template instantiation 'void
> boost::serialization::serialize<Archive,T>(Archive &,T &,const
> unsigned
> int)' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=const D2::MessagePtr
> ]
> c:\new_boost\boost\boost\archive\detail\oserializer.hpp(152) :

The choice is made here.

>>>> namespace boost {
>>>> namespace serialization {
>>>> template<class Archive >
>>>> static void serialize(Archive & ar, const
>>> D2::Message& g, const
>>>> unsigned int version)
>>>> {
>>>> //...
>>>> }
>>>>
>>>> } };
>>>>

Note that your serialize template above uses datatype D2::Message while one
is trying to serialize D2::MessagePtr.

> see reference to function template instantiation 'void
> boost::serialization::serialize_adl<Archive,T>(Archive &,T &,const
> unsigned int)' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=const D2::MessagePtr
> ]
>
> c:\new_boost\boost\boost\serialization\extended_type_info_typeid.hpp(71)
>> while compiling class-template member function 'void
> boost::archive::detail::oserializer<Archive,T>::save_object_data(boost::
> archive::detail::basic_oarchive &,const void *) const'
> with
> [
> Archive=boost::archive::text_oarchive,
> T=D2::MessagePtr
> ]
> c:\new_boost\boost\boost\archive\detail\oserializer.hpp(236) :
> see reference to class template instantiation
> 'boost::archive::detail::oserializer<Archive,T>' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=D2::MessagePtr
> ]
> c:\new_boost\boost\boost\archive\detail\oserializer.hpp(235) :
> while compiling class-template member function 'void
> boost::archive::detail::save_non_pointer_type<Archive,T>::save_standard:
>> invoke(Archive &,const Jrs::SmartPtr<D2::Message> &)'
> with
> [
> Archive=boost::archive::text_oarchive,
> T=D2::MessageP
> tr
> ]
> c:\new_boost\boost\boost\archive\detail\oserializer.hpp(294) :
> see reference to class template instantiation
> 'boost::archive::detail::save_non_pointer_type<Archive,T>::save_standard
> ' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=D2::MessagePtr
> ]
> c:\new_boost\boost\boost\archive\detail\oserializer.hpp(282) :
> while compiling class-template member function 'void
> boost::archive::detail::save_non_pointer_type<Archive,T>::invoke(Archive
> &,const Jrs::SmartPtr<D2::Message> &)'
> with
> [
> Archive=boost::archive::text_oarchive,
> T=D2::MessagePtr
> ]
> c:\new_boost\boost\boost\archive\detail\oserializer.hpp(534) :
> see reference to class template instantiation
> 'boost::archive::detail::save_non_pointer_type<Archive,T>' being
> compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=D2::MessagePtr
> ]
> c:\new_boost\boost\boost\archive\basic_text_oarchive.hpp(78) :
> see reference to function template instantiation 'void
> boost::archive::save<Archive,T>(Archive &,T &)' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=const D2::MessagePtr
> ]
>
> c:\new_boost\boost\boost\archive\detail\interface_oarchive.hpp(89) :
> see reference to function template instantiation 'void
> boost::archive::basic_text_oarchive<Archive>::save_override<T>(T
> &,int)' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=const D2::MessagePtr
> ]
> c:\D2\API\NewClient\EnhancedMessageHandler.cpp(115) : see
> reference to function template instantiation 'Archive
> &boost::archive::detail::interface_oarchive<Archive>::operator
> <<<const D2::MessagePtr>(T &)' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=const D2::MessagePtr
> ]
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


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