Boost C++ Libraries: Ticket #4022: dynamic_bitset compiler issue https://svn.boost.org/trac10/ticket/4022 <p> dynamic_bitset does not compile with int64 on Visual Studio 9. THink culprit is code below </p> <p> const size_type extra_bits = count_extra_bits(); </p> <p> This should be </p> <p> const block_width_type extra_bits = count_extra_bits(); </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/4022 Trac 1.4.3 Steven Watanabe Wed, 17 Mar 2010 04:06:32 GMT component changed; owner set https://svn.boost.org/trac10/ticket/4022#comment:1 https://svn.boost.org/trac10/ticket/4022#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Gennaro Prota</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">dynamic_bitset</span> </li> </ul> Ticket anonymous Wed, 17 Mar 2010 12:25:37 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/4022#comment:2 https://svn.boost.org/trac10/ticket/4022#comment:2 <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 anonymous Wed, 17 Mar 2010 12:26:12 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/4022#comment:3 https://svn.boost.org/trac10/ticket/4022#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> Ticket Steven Watanabe Sun, 21 Mar 2010 05:09:43 GMT <link>https://svn.boost.org/trac10/ticket/4022#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/4022#comment:4</guid> <description> <p> Of course, you have to use an unsigned type. With that the code does compile, although it emits a warning. The warning is harmless in this case, although it would be better to fix it as you suggest. </p> <pre class="wiki">#include &lt;boost/dynamic_bitset/dynamic_bitset.hpp&gt; int main() { boost::dynamic_bitset&lt;unsigned long long&gt; bitset_type; bitset_type.resize(10, false); } </pre><pre class="wiki">boost/dynamic_bitset/dynamic_bitset.hpp(673) : warning C4244: 'initializing' : conversion from 'unsigned __int64' to 'const boost::dynamic_bitset&lt;Block&gt;::size_type', possible loss of data with [ Block=unsigned __int64 ] boost/dynamic_bitset/dynamic_bitset.hpp(649) : while compiling class template member function 'void boost::dynamic_bitset&lt;Block&gt;::resize(boost::dynamic_bitset&lt;Block&gt;::size_type,bool)' with [ Block=unsigned __int64 ] .\scratch.cpp(4) : see reference to class template instantiation 'boost::dynamic_bitset&lt;Block&gt;' being compiled with [ Block=unsigned __int64 ] </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Sun, 13 Jun 2010 04:37:01 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/4022#comment:5 https://svn.boost.org/trac10/ticket/4022#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/62898" title="Use the correct variable type to save the result of ...">[62898]</a>) Use the correct variable type to save the result of count_extra_bits(). Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4022" title="#4022: Bugs: dynamic_bitset compiler issue (closed: fixed)">#4022</a>. </p> Ticket