id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc
7949,Level 4 Warnings with VS2005,Peter Brockamp
,Antony Polukhin,"Try to compile the following with /W4 under VS2005:
{{{
#include ""boost/lexical_cast.hpp""
#include ""boost/date_time.hpp""
}}}
This will give you a bunch of warnings:
{{{
\boost\lexical_cast.hpp(732) : warning C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data
\boost\lexical_cast.hpp(1627) : see reference to function template instantiation 'bool boost::detail::lcast_ret_unsigned(T &,const CharT *const ,const CharT *)' being compiled
\boost\lexical_cast.hpp(1751) : see reference to function template instantiation 'bool boost::detail::lexical_stream_limited_src::shr_unsigned(Type &)' being compiled
\boost\lexical_cast.hpp(1751) : while compiling class template member function 'bool boost::detail::lexical_stream_limited_src::operator >>(unsigned short &)'
\boost\lexical_cast.hpp(2137) : see reference to class template instantiation 'boost::detail::lexical_stream_limited_src' being compiled
\boost\lexical_cast.hpp(2083) : while compiling class template member function 'unsigned short boost::detail::lexical_cast_do_cast::lexical_cast_impl(const Source &)'
\boost\lexical_cast.hpp(2300) : see reference to class template instantiation 'boost::detail::lexical_cast_do_cast' being compiled
\boost\date_time\date_parsing.hpp(138) : see reference to function template instantiation 'Target boost::lexical_cast(const Source &)' being compiled
\boost\date_time\gregorian\parsers.hpp(30) : see reference to function template instantiation 'date_type boost::date_time::parse_date(const std::string &,int)' being compiled
\boost\lexical_cast.hpp(780) : warning C4244: '+=' : conversion from 'int' to 'unsigned short', possible loss of data
}}}
Attached a patch which silences these, as is done in other libraries.
",Bugs,closed,Boost 1.54.0,lexical_cast,Boost 1.52.0,Optimization,fixed,warnings VS2005,