Boost C++ Libraries: Ticket #585: 64 bit compile warning/error for boost::format https://svn.boost.org/trac10/ticket/585 <pre class="wiki">We are using MS Visual Studio 2005. Compiling for 64 bit Windos. We are compiling with warning level 4 and warnings == error. We're using boost 1.33.1 and STLPort 5.0.0 boost::format generates a possible loss of data conversion warning when compiling alt_sstream_impl.hpp -Lee lee.eggebroten@atlassolutions.com ++++++++++++++++++++++++++++++++++++++++++++ 1&gt;c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(110) : error C2220: warning treated as error - no 'object' file generated 1&gt; c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(96) : while compiling class template member function 'stlp_std::fpos&lt;_StateT&gt; boost::io::basic_altstringbuf&lt;Ch,Tr,Alloc&gt;::seekoff(__int64,stlp_std::ios_base::seekdir,stlp_std::ios_base::openmode)' 1&gt; with 1&gt; [ 1&gt; _StateT=mbstate_t, 1&gt; Ch=char, 1&gt; Tr=stlp_std::char_traits&lt;char&gt;, 1&gt; Alloc=stlp_std::allocator&lt;char&gt; 1&gt; ] 1&gt; c:\External\boost_1_33_1\boost/format/format_class.hpp(136) : see reference to class template instantiation 'boost::io::basic_altstringbuf&lt;Ch,Tr,Alloc&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; Ch=char, 1&gt; Tr=stlp_std::char_traits&lt;char&gt;, 1&gt; Alloc=stlp_std::allocator&lt;char&gt; 1&gt; ] 1&gt; ..\PVMTrace.cpp(120) : see reference to class template instantiation 'boost::basic_format&lt;Ch&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; Ch=char 1&gt; ] 1&gt;c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(110) : warning C4244: 'argument' : conversion from '__int64' to 'int', possible loss of data 1&gt;c:\External\boost_1_33_1\boost/format/alt_sstream_impl.hpp(128) : warning C4244: 'argument' : conversion from '__int64' to 'int', possible loss of data 1&gt;c:\External\boost_1_33_1\boost/format/feed_args.hpp(53) : warning C4244: 'argument' : conversion from 'stlp_std::streamsize' to 'stlp_std::basic_string&lt;_CharT,_Traits,_Alloc&gt;::size_type', possible loss of data 1&gt; with 1&gt; [ 1&gt; _CharT=char, 1&gt; _Traits=stlp_std::char_traits&lt;char&gt;, 1&gt; _Alloc=stlp_std::allocator&lt;char&gt; 1&gt; ] 1&gt; c:\External\boost_1_33_1\boost/format/feed_args.hpp(161) : see reference to function template instantiation 'void boost::io::detail::mk_str&lt;char,stlp_std::char_traits&lt;char&gt;,stlp_std::allocator&lt;_Tp&gt;&gt;(stlp_std::basic_string&lt;_CharT,_Traits,_Alloc&gt; &amp;,const Ch *,stlp_std::basic_string&lt;_CharT,_Traits,_Alloc&gt;::size_type,stlp_std::streamsize,const Ch,stlp_std::ios_base::fmtflags,const Ch,bool)' being compiled 1&gt; with 1&gt; [ 1&gt; _Tp=char, 1&gt; _CharT=char, 1&gt; _Traits=stlp_std::char_traits&lt;char&gt;, 1&gt; _Alloc=stlp_std::allocator&lt;char&gt;, 1&gt; Ch=char 1&gt; ] 1&gt; c:\External\boost_1_33_1\boost/format/feed_args.hpp(242) : see reference to function template instantiation 'void boost::io::detail::put&lt;Ch,Tr,Alloc,T&gt;(T,const boost::io::detail::format_item&lt;Ch,Tr,Alloc&gt; &amp;,stlp_std::basic_string&lt;_CharT,_Traits,_Alloc&gt; &amp;,boost::io::basic_altstringbuf&lt;Ch,Tr,Alloc&gt; &amp;,boost::io::detail::locale_t *)' being compiled 1&gt; with 1&gt; [ 1&gt; Ch=char, 1&gt; Tr=stlp_std::char_traits&lt;char&gt;, 1&gt; Alloc=stlp_std::allocator&lt;char&gt;, 1&gt; T=const stlp_std::string &amp;, 1&gt; _CharT=char, 1&gt; _Traits=stlp_std::char_traits&lt;char&gt;, 1&gt; _Alloc=stlp_std::allocator&lt;char&gt; 1&gt; ] 1&gt; c:\External\boost_1_33_1\boost/format/feed_args.hpp(251) : see reference to function template instantiation 'void boost::io::detail::distribute&lt;Ch,Tr,Alloc,T&gt;(boost::basic_format&lt;Ch&gt; &amp;,T)' being compiled 1&gt; with 1&gt; [ 1&gt; Ch=char, 1&gt; Tr=stlp_std::char_traits&lt;char&gt;, 1&gt; Alloc=stlp_std::allocator&lt;char&gt;, 1&gt; T=const stlp_std::string &amp; 1&gt; ] 1&gt; c:\External\boost_1_33_1\boost/format/format_class.hpp(64) : see reference to function template instantiation 'boost::basic_format&lt;Ch&gt; &amp;boost::io::detail::feed&lt;char,Tr,Alloc,const T&amp;&gt;(boost::basic_format&lt;Ch&gt; &amp;,const stlp_std::basic_string&lt;_CharT,_Traits,_Alloc&gt;)' being compiled 1&gt; with 1&gt; [ 1&gt; Ch=char, 1&gt; Tr=stlp_std::char_traits&lt;char&gt;, 1&gt; Alloc=stlp_std::allocator&lt;char&gt;, 1&gt; T=stlp_std::string, 1&gt; _CharT=char, 1&gt; _Traits=stlp_std::char_traits&lt;char&gt;, 1&gt; _Alloc=stlp_std::allocator&lt;char&gt; 1&gt; ] 1&gt; ..\PVMTrace.cpp(121) : see reference to function template instantiation 'boost::basic_format&lt;Ch&gt; &amp;boost::basic_format&lt;Ch&gt;::operator %&lt;stlp_std::string&gt;(const T &amp;)' being compiled 1&gt; with 1&gt; [ 1&gt; Ch=char, 1&gt; T=stlp_std::string 1&gt; ] 1&gt;c:\External\boost_1_33_1\boost/format/feed_args.hpp(62) : warning C4244: 'argument' : conversion from 'stlp_std::streamsize' to 'stlp_std::basic_string&lt;_CharT,_Traits,_Alloc&gt;::size_type', possible loss of data 1&gt; with 1&gt; [ 1&gt; _CharT=char, 1&gt; _Traits=stlp_std::char_traits&lt;char&gt;, 1&gt; _Alloc=stlp_std::allocator&lt;char&gt; 1&gt; ] 1&gt;c:\External\boost_1_33_1\boost/format/feed_args.hpp(66) : warning C4244: 'argument' : conversion from 'stlp_std::streamsize' to 'stlp_std::basic_string&lt;_CharT,_Traits,_Alloc&gt;::size_type', possible loss of data 1&gt; with 1&gt; [ 1&gt; _CharT=char, 1&gt; _Traits=stlp_std::char_traits&lt;char&gt;, 1&gt; _Alloc=stlp_std::allocator&lt;char&gt; 1&gt; ] 1&gt;Build Time 0:02 1&gt;Build log was saved at "file://c:\Ad Serving\main\pvm\pvm_core\Release_Win32\BuildLog.htm" 1&gt;pvm_core - 1 error(s), 5 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/585 Trac 1.4.3 anonymous Sat, 23 Jun 2007 12:01:20 GMT <link>https://svn.boost.org/trac10/ticket/585#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/585#comment:1</guid> <description> <p> Reproducable with 1.34.0 </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Sun, 19 Aug 2007 15:57:07 GMT</pubDate> <title>component, description changed; severity set https://svn.boost.org/trac10/ticket/585#comment:2 https://svn.boost.org/trac10/ticket/585#comment:2 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">format</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/585?action=diff&amp;version=2">diff</a>) </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket John Maddock Tue, 20 Nov 2007 11:49:11 GMT status, resolution changed; milestone set https://svn.boost.org/trac10/ticket/585#comment:3 https://svn.boost.org/trac10/ticket/585#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> → <span class="trac-field-new">Boost 1.35.0</span> </li> </ul> <p> Reproduced and fixed in SVN. </p> Ticket