Minor spurious warning message -- Very Trivial
Hi all, Using Boost 1.33.1 serialization library with Micro$oft Visual Studio 2005, I get two minor warnings while compiling the demo_xml.cpp program. They are in boost/serialization/collections_save_imp.hpp. Lines 36 and 37 in the function template save_collection are the culprit, resulting in warnings of the form: warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data These are the problem lines: unsigned int count = s.size(); ar << make_nvp("count", const_cast<const unsigned int &>(count)); Changing the "unsigned int" to "size_t" fixes the warnings, like this: size_t count = s.size(); ar << make_nvp("count", const_cast<const size_t &>(count)); Trivial problem, I admit, but warnings are warnings... Cheers, -RSG
"Robert S. Grimes" <rsgrimes@rcn.com> wrote in message news:CJEDLPCELDKNDAFCJBMMEEHGEEAA.rsgrimes@rcn.com...
Hi all,
Using Boost 1.33.1 serialization library ...
It helps library maintainers zoom in on pasting about their library if you put the name of the library in the subject line. The usual convention looks like this: [serialization] Minor spurious warnings -- Very Trivial Thanks, --Beman
participants (2)
-
Beman Dawes
-
Robert S. Grimes