Boost C++ Libraries: Ticket #4601: conversion from 'unsigned long' to 'boost::uint8_t warning https://svn.boost.org/trac10/ticket/4601 <p> ...\boost_1_44_0\boost/uuid/random_generator.hpp(93) : warning C4244: '=' : conversion from 'unsigned long' to 'boost::uint8_t', possible loss of data </p> <p> with MSVC8 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4601 Trac 1.4.3 Marshall Clow Mon, 14 Feb 2011 15:47:58 GMT <link>https://svn.boost.org/trac10/ticket/4601#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4601#comment:1</guid> <description> <p> Here's the line of code: </p> <pre class="wiki"> *it = ((random_value &gt;&gt; (i*8)) &amp; 0xFF); </pre><p> As you can see, there's no loss of data here, since the value is anded with 0xFF before being stored into the iterator. The compiler is just being a PITA. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andy Tompkins</dc:creator> <pubDate>Sat, 05 Mar 2011 23:42:44 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/4601#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4601#comment:2</guid> <description> <p> Added a static_cast to get rid of warning. Committed to trunk. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andy Tompkins</dc:creator> <pubDate>Mon, 30 May 2011 00:39:14 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4601#comment:3 https://svn.boost.org/trac10/ticket/4601#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket