Boost C++ Libraries: Ticket #3984: utility/swap std_bitset regression failure on msvc-10 (RC) https://svn.boost.org/trac10/ticket/3984 <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/browser/trunk/libs/utility/swap/test/std_bitset.cpp?rev=53141"><span class="icon">​</span>boost/trunk/libs/utility/swap/test/std_bitset.cpp revision 53141</a> does: </p> <pre class="wiki"> typedef std::bitset&lt;8&gt; bitset_type; const bitset_type initial_value1 = 1ul; const bitset_type initial_value2 = 2ul; </pre><p> Microsoft Visual C++ 10 RC rejects this piece of code, according to <a href="http://www.boost.org/development/tests/trunk/developer/output/RWVC10-boost-bin-v2-libs-utility-swap-test-std_bitset-test-msvc-10-0-debug-threading-multi.html">http://www.boost.org/development/tests/trunk/developer/output/RWVC10-boost-bin-v2-libs-utility-swap-test-std_bitset-test-msvc-10-0-debug-threading-multi.html</a> which says: </p> <pre class="wiki"> Test output: RWVC10 - utility/swap - std_bitset / msvc-10.0 Rev 60096 / Wed, 3 Mar 2010 11:41:12 +0000 Report Time: Wed, 3 Mar 2010 23:58:03 +0000 Compile [2010-03-03 16:35:50 UTC]: fail call "C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/vcvarsall.bat" x86 &gt;nul cl /Zm800 -nologo @"C:\run\results\boost\bin.v2\libs\utility\swap\test\std_bitset.test\msvc-10.0\debug\threading-multi\std_bitset.obj.rsp" std_bitset.cpp ..\libs\utility\swap\test\std_bitset.cpp(20) : error C2440: 'initializing' : cannot convert from 'unsigned long' to 'std::bitset&lt;_Bits&gt;' with [ _Bits=8 ] No constructor could take the source type, or constructor overload resolution was ambiguous ..\libs\utility\swap\test\std_bitset.cpp(21) : error C2440: 'initializing' : cannot convert from 'unsigned long' to 'std::bitset&lt;_Bits&gt;' with [ _Bits=8 ] No constructor could take the source type, or constructor overload resolution was ambiguous </pre><p> This is caused by a bug, reported to Microsoft by Richard Webb: <a class="ext-link" href="https://connect.microsoft.com/VisualStudio/feedback/details/532897/problems-constructing-a-bitset-from-an-unsigned-long-in-the-vc-rc"><span class="icon">​</span>https://connect.microsoft.com/VisualStudio/feedback/details/532897/problems-constructing-a-bitset-from-an-unsigned-long-in-the-vc-rc</a> </p> <p> Juergen Hunold tested various workarounds at msvc-10.0, msvc-9.0 and gcc-4.4. See also <em>[boost] [utility/swap] MSVC 10 test failure, unsigned long to std::bitset conversion invalid?</em>, <a class="ext-link" href="http://lists.boost.org/Archives/boost/2010/03/162690.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2010/03/162690.php</a> </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3984 Trac 1.4.3 niels_dekker Sun, 07 Mar 2010 21:42:23 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3984#comment:1 https://svn.boost.org/trac10/ticket/3984#comment:1 <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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/60331" title="Hopefully fixed #3984 (std::bitset constructor issue). Tested by ...">[60331]</a>) Hopefully fixed <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3984" title="#3984: Bugs: utility/swap std_bitset regression failure on msvc-10 (RC) (closed: fixed)">#3984</a> (std::bitset constructor issue). Tested by Juergen Hunold on msvc-10.0, msvc-9.0, and gcc-4.4. See thread starting at <a class="ext-link" href="http://lists.boost.org/Archives/boost/2010/03/162690.php"><span class="icon">​</span>http://lists.boost.org/Archives/boost/2010/03/162690.php</a> </p> Ticket niels_dekker Sun, 07 Mar 2010 22:03:18 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/3984#comment:2 https://svn.boost.org/trac10/ticket/3984#comment:2 <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> <p> Hmmm, Trac appears to have closed the ticket <em>automagically</em>, because the commit message of <a class="changeset" href="https://svn.boost.org/trac10/changeset/60331" title="Hopefully fixed #3984 (std::bitset constructor issue). Tested by ...">[60331]</a> contained the text <em>fixed <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3984" title="#3984: Bugs: utility/swap std_bitset regression failure on msvc-10 (RC) (closed: fixed)">#3984</a></em>. That was not intended! Before closing, I would like to see the regression results, and I would like the the release branch to be fixed as well. </p> Ticket niels_dekker Mon, 05 Apr 2010 19:11:45 GMT <link>https://svn.boost.org/trac10/ticket/3984#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3984#comment:3</guid> <description> <p> Related issue of the Standard C++ Library Working Group, submitted by Christopher Jefferson: <a class="ext-link" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3087.html#1325"><span class="icon">​</span>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3087.html#1325</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>niels_dekker</dc:creator> <pubDate>Mon, 05 Apr 2010 19:28:16 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3984#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3984#comment:4</guid> <description> <p> Merged the fix to the release branch: <a class="changeset" href="https://svn.boost.org/trac10/changeset/61077" title="Merged std_bitset.cpp (boost::swap test) from trunk r60292 through ...">[61077]</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Sun, 03 Jun 2012 20:34:16 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3984#comment:5 https://svn.boost.org/trac10/ticket/3984#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> Closed as for description it is already fixed. </p> Ticket