Subject: [Boost-bugs] [Boost C++ Libraries] #8963: Warnings from binary archives
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-08-04 17:47:21
#8963: Warnings from binary archives
-------------------------------------+---------------------------
Reporter: johnmaddock | Owner: ramey
Type: Bugs | Status: new
Milestone: To Be Determined | Component: serialization
Version: Boost Development Trunk | Severity: Problem
Keywords: |
-------------------------------------+---------------------------
Simply #including:
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>
Is sufficient to generate several pages of msvc warnings:
{{{
1>d:\data\boost\trunk\boost\archive\basic_binary_iprimitive.hpp(181):
warning C4244: 'argument' : conversion from 'std::streamsize' to 'size_t',
possible loss of data
1>
d:\data\boost\trunk\boost\archive\basic_binary_iprimitive.hpp(152) : while
compiling class template member function 'void
boost::archive::basic_binary_iprimitive<Archive,Elem,Tr>::load_binary(void
*,size_t)'
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> Elem=char,
1> Tr=std::char_traits<char>
1> ]
1> d:\data\boost\trunk\boost\archive\detail\iserializer.hpp(362)
: see reference to function template instantiation 'void
boost::archive::load_access::load_primitive<Archive,T>(Archive &,T &)'
being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1> d:\data\boost\trunk\boost\archive\detail\iserializer.hpp(439)
: see reference to function template instantiation 'void
boost::archive::detail::load_non_pointer_type<Archive>::load_primitive::invoke<T>(Archive
&,T &)' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1> d:\data\boost\trunk\boost\archive\detail\iserializer.hpp(592)
: see reference to function template instantiation 'void
boost::archive::detail::load_non_pointer_type<Archive>::invoke<T>(Archive
&,T &)' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\common_iarchive.hpp(66) : see
reference to function template instantiation 'void
boost::archive::load<Archive,T>(Archive &,T &)' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\basic_binary_iarchive.hpp(70) : see
reference to function template instantiation 'void
boost::archive::detail::common_iarchive<Archive>::load_override<T>(T
&,int)' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1> d:\data\boost\trunk\boost\archive\binary_iarchive_impl.hpp(50)
: see reference to function template instantiation 'void
boost::archive::basic_binary_iarchive<Archive>::load_override<T>(T &,int)'
being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\interface_iarchive.hpp(60) : see
reference to function template instantiation 'void
boost::archive::binary_iarchive_impl<Archive,Elem,Tr>::load_override<T>(T
&,int)' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> Elem=char,
1> Tr=std::char_traits<char>,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\common_iarchive.hpp(48) : see
reference to function template instantiation 'Archive
&boost::archive::detail::interface_iarchive<Archive>::operator
>><boost::archive::object_id_type>(T &)' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\common_iarchive.hpp(47) : while
compiling class template member function 'void
boost::archive::detail::common_iarchive<Archive>::vload(boost::archive::object_id_type
&)'
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive
1> ]
1>
d:\data\boost\trunk\boost\archive\basic_binary_iarchive.hpp(52) : see
reference to class template instantiation
'boost::archive::detail::common_iarchive<Archive>' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive
1> ]
1> d:\data\boost\trunk\boost\archive\binary_iarchive_impl.hpp(36)
: see reference to class template instantiation
'boost::archive::basic_binary_iarchive<Archive>' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive
1> ]
1> d:\data\boost\trunk\boost\archive\binary_iarchive.hpp(42) :
see reference to class template instantiation
'boost::archive::binary_iarchive_impl<Archive,Elem,Tr>' being compiled
1> with
1> [
1> Archive=boost::archive::naked_binary_iarchive,
1> Elem=char,
1> Tr=std::char_traits<char>
1> ]
1>d:\data\boost\trunk\boost\archive\basic_binary_iprimitive.hpp(181):
warning C4244: 'argument' : conversion from 'std::streamsize' to 'size_t',
possible loss of data
1>
d:\data\boost\trunk\boost\archive\basic_binary_iprimitive.hpp(152) : while
compiling class template member function 'void
boost::archive::basic_binary_iprimitive<Archive,Elem,Tr>::load_binary(void
*,size_t)'
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> Elem=char,
1> Tr=std::char_traits<char>
1> ]
1> d:\data\boost\trunk\boost\archive\detail\iserializer.hpp(362)
: see reference to function template instantiation 'void
boost::archive::load_access::load_primitive<Archive,T>(Archive &,T &)'
being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1> d:\data\boost\trunk\boost\archive\detail\iserializer.hpp(439)
: see reference to function template instantiation 'void
boost::archive::detail::load_non_pointer_type<Archive>::load_primitive::invoke<T>(Archive
&,T &)' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1> d:\data\boost\trunk\boost\archive\detail\iserializer.hpp(592)
: see reference to function template instantiation 'void
boost::archive::detail::load_non_pointer_type<Archive>::invoke<T>(Archive
&,T &)' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\common_iarchive.hpp(66) : see
reference to function template instantiation 'void
boost::archive::load<Archive,T>(Archive &,T &)' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\basic_binary_iarchive.hpp(70) : see
reference to function template instantiation 'void
boost::archive::detail::common_iarchive<Archive>::load_override<T>(T
&,int)' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1> d:\data\boost\trunk\boost\archive\binary_iarchive_impl.hpp(50)
: see reference to function template instantiation 'void
boost::archive::basic_binary_iarchive<Archive>::load_override<T>(T &,int)'
being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\interface_iarchive.hpp(60) : see
reference to function template instantiation 'void
boost::archive::binary_iarchive_impl<Archive,Elem,Tr>::load_override<T>(T
&,int)' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> Elem=char,
1> Tr=std::char_traits<char>,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\common_iarchive.hpp(48) : see
reference to function template instantiation 'Archive
&boost::archive::detail::interface_iarchive<Archive>::operator
>><boost::archive::object_id_type>(T &)' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> T=boost::archive::object_id_type
1> ]
1>
d:\data\boost\trunk\boost\archive\detail\common_iarchive.hpp(47) : while
compiling class template member function 'void
boost::archive::detail::common_iarchive<Archive>::vload(boost::archive::object_id_type
&)'
1> with
1> [
1> Archive=boost::archive::binary_iarchive
1> ]
1>
d:\data\boost\trunk\boost\archive\basic_binary_iarchive.hpp(52) : see
reference to class template instantiation
'boost::archive::detail::common_iarchive<Archive>' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive
1> ]
1> d:\data\boost\trunk\boost\archive\binary_iarchive_impl.hpp(36)
: see reference to class template instantiation
'boost::archive::basic_binary_iarchive<Archive>' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive
1> ]
1> d:\data\boost\trunk\boost\archive\binary_iarchive.hpp(76) :
see reference to class template instantiation
'boost::archive::binary_iarchive_impl<Archive,Elem,Tr>' being compiled
1> with
1> [
1> Archive=boost::archive::binary_iarchive,
1> Elem=char,
1> Tr=std::char_traits<char>
1> ]
}}}
The attached patch fixes the warning.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/8963> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC