Boost C++ Libraries: Ticket #11842: VC 2005 warning "conversion from '__w64 int' to streamsize" when lexical_cast from string to double. https://svn.boost.org/trac10/ticket/11842 <p> Symptom: When cast to double as follows: </p> <blockquote> <p> double d = boost::lexical_cast&lt;double&gt;("123.4");; </p> </blockquote> <p> boost 1.59.0 has the following warning when compile on Visual studio 2005 platform under Unicode. </p> <p> 1&gt;c:\boost-v1.59.0\include\boost-1_59\boost\lexical_cast\detail\converter_lexical_streams.hpp(587) : warning C4244: 'argument' : conversion from '<span class="underline">w64 int' to 'boost::detail::basic_pointerbuf&lt;charT,BufferT&gt;::streamsize', possible loss of data </span></p> <p> Fix: Change line 586@ boost\lexical_cast\detail\converter_lexical_streams.hpp </p> <p> From: buf.setbuf(const_cast&lt;CharT*&gt;(start), finish - start); To: buf.setbuf(const_cast&lt;CharT*&gt;(start), static_cast&lt;std::streamsize&gt;(finish - start)); </p> <p> Please review. Thanks </p> <p> Ting </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11842 Trac 1.4.3 Antony Polukhin Fri, 20 Jan 2017 19:43:57 GMT status, milestone changed https://svn.boost.org/trac10/ticket/11842#comment:1 https://svn.boost.org/trac10/ticket/11842#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.64.0</span> </li> </ul> <p> Fixed in <a class="ext-link" href="https://github.com/apolukhin/lexical_cast/commit/d53933cd3bf7fdbb094c9c3b882d3430d90a8bc6"><span class="icon">​</span>d53933cd</a> develop branch. Will be merged to master as soon as all the tests will cycle. </p> Ticket Antony Polukhin Sat, 22 Apr 2017 06:00:08 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11842#comment:2 https://svn.boost.org/trac10/ticket/11842#comment:2 <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-new">fixed</span> </li> </ul> Ticket