Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-10-22 19:36:49


I presume you are using VC 7.1 IDE. Make sure that the project properties
are set for C++ so that Enable Runtime Info is set to "Yes"

Robert Ramey

Lucas Meijer wrote:
> Hey Robert,
>
> first off, thanks for the work on the serialization library, it looks
> really good so far.
>
> sorry for not including this info in my original post.
>
>> what compiler are you running?
>
> Microsoft Visual Studio .NET 2003
> boost succesfully built using boost.jam
>
>> which version of boost are you running?
>
> 1_33_0
>
>> do the tests/examples run on your system?
>
> yes.
>
>> what do the warnings say?
>
> warning C4541: 'dynamic_cast' used on polymorphic type
> 'boost::archive::detail::basic_oarchive' with /GR-; unpredictable
> behavior may result
>
> (see full warning below.)
>
> this is compiling the following code:
>
> std::stringstream ss;
> boost::archive::binary_oarchive oa(ss); //also tried with
> text_oarchive std::vector<int> myvec;
> myvec.push_back(12);
> const std::vector<int>& ref = myvec; //seem to require a reference.
> oa << ref;
>
>> I would think what you've done below should work.
>
> thanks for the realitycheck,
>
> Lucas
>
> c:\Boost\include\boost-1_33\boost\smart_cast.hpp(76) : warning C4541:
> 'dynamic_cast' used on polymorphic type
> 'boost::archive::detail::basic_oarchive' with /GR-; unpredictable
> behavior may result
> c:\Boost\include\boost-1_33\boost\smart_cast.hpp(87) : see
> reference to function template instantiation 'T
> boost::smart_cast_impl::reference<T>::polymorphic::cross::cast<U>(U
> &)' being compiled
> with
> [
> T=boost::archive::binary_oarchive &,
> U=boost::archive::detail::basic_oarchive
> ]
> c:\Boost\include\boost-1_33\boost\smart_cast.hpp(135) : see
> reference to function template instantiation 'T
> boost::smart_cast_impl::reference<T>::polymorphic::cast<U>(U &)' being
> compiled
> with
> [
> T=boost::archive::binary_oarchive &,
> U=boost::archive::detail::basic_oarchive
> ]
> c:\Boost\include\boost-1_33\boost\smart_cast.hpp(293) : see
> reference to function template instantiation 'T
> boost::smart_cast_impl::reference<T>::cast<U>(U &)' being compiled
> with
> [
> T=boost::archive::binary_oarchive &,
> U=boost::archive::detail::basic_oarchive
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(148)
> : see reference to function template instantiation 'T
> boost::smart_cast_reference<Archive&,boost::archive::detail::basic_oarchive>(U
> &)' being compiled
> with
> [
> T=boost::archive::binary_oarchive &,
> Archive=boost::archive::binary_oarchive,
> U=boost::archive::detail::basic_oarchive
> ]
>
> c:\Boost\include\boost-1_33\boost\serialization\extended_type_info_typeid.hpp(69)
>> 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::binary_oarchive,
> T=std::vector<int>
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(263)
> : see reference to class template instantiation
> 'boost::archive::detail::oserializer<Archive,T>' being compiled
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=std::vector<int>
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(262)
> : while compiling class-template member function 'void
> boost::archive::detail::save_non_pointer_type<Archive,T>::save_standard::invoke(Archive
> &,const std::vector<_Ty> &)'
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=std::vector<int>,
> _Ty=int
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(272)
> : see reference to class template instantiation
> 'boost::archive::detail::save_non_pointer_type<Archive,T>::save_standard'
> being compiled
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=std::vector<int>
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(270)
> : while compiling class-template member function 'void
> boost::archive::detail::save_non_pointer_type<Archive,T>::save_conditional::invoke(Archive
> &,const std::vector<_Ty> &)'
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=std::vector<int>,
> _Ty=int
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(321)
> : see reference to class template instantiation
> 'boost::archive::detail::save_non_pointer_type<Archive,T>::save_conditional'
> being compiled
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=std::vector<int>
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(309)
> : while compiling class-template member function 'void
> boost::archive::detail::save_non_pointer_type<Archive,T>::invoke(Archive
> &,const std::vector<_Ty> &)'
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=std::vector<int>,
> _Ty=int
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\oserializer.hpp(535)
> : see reference to class template instantiation
> 'boost::archive::detail::save_non_pointer_type<Archive,T>' being
> compiled with
> [
> Archive=boost::archive::binary_oarchive,
> T=std::vector<int>
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\basic_binary_oarchive.hpp(70)
>> see reference to function template instantiation 'void
> boost::archive::save<Archive,T>(Archive &,T &)' being compiled
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=const std::vector<int>
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\binary_oarchive.hpp(47) :
> see reference to function template instantiation 'void
> boost::archive::basic_binary_oarchive<Archive>::save_override<T>(T
> &,int)' being compiled
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=const std::vector<int>
> ]
>
> c:\Boost\include\boost-1_33\boost\archive\detail\interface_oarchive.hpp(85)
>> see reference to function template instantiation 'void
> boost::archive::binary_oarchive_impl<Archive>::save_override<T>(T
> &,int)' being compiled
> with
> [
> Archive=boost::archive::binary_oarchive,
> T=const std::vector<int>
> ]
>
> c:\PetProjects\XtraDevelopment\CastmemberPropertyXtra\source\casset.cpp(480)
>> see reference to function template instantiation 'Archive
> &boost::archive::detail::interface_oarchive<Archive>::operator
> <<<const std::vector<_Ty>>(T &)' being compiled
> with
> [
> Archive=boost::archive::binary_oarchive,
> _Ty=int,
> T=const std::vector<int>
> ]
> Linking...


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