[Boost-bugs] [Boost C++ Libraries] #3984: utility/swap std_bitset regression failure on msvc-10 (RC)

Subject: [Boost-bugs] [Boost C++ Libraries] #3984: utility/swap std_bitset regression failure on msvc-10 (RC)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-03-07 10:55:08


#3984: utility/swap std_bitset regression failure on msvc-10 (RC)
--------------------------+-------------------------------------------------
 Reporter: niels_dekker | Owner: niels_dekker
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: utility
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: |
--------------------------+-------------------------------------------------
 [https://svn.boost.org/trac/boost/browser/trunk/libs/utility/swap/test/std_bitset.cpp?rev=53141
 boost/trunk/libs/utility/swap/test/std_bitset.cpp revision 53141] does:
 {{{
     typedef std::bitset<8> bitset_type;
     const bitset_type initial_value1 = 1ul;
     const bitset_type initial_value2 = 2ul;
 }}}

 Microsoft Visual C++ 10 RC rejects this piece of code, according to
 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 which says:
 {{{
  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 >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<_Bits>'
         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<_Bits>'
         with
         [
             _Bits=8
         ]
         No constructor could take the source type, or constructor overload
 resolution was ambiguous
 }}}

 This is caused by a bug, reported to Microsoft by Richard Webb:
 https://connect.microsoft.com/VisualStudio/feedback/details/532897
 /problems-constructing-a-bitset-from-an-unsigned-long-in-the-vc-rc

 Juergen Hunold tested various workarounds at msvc-10.0, msvc-9.0 and
 gcc-4.4. See also ''[boost] [utility/swap] MSVC 10 test failure, unsigned
 long to std::bitset conversion invalid?'',
 http://lists.boost.org/Archives/boost/2010/03/162690.php

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3984>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC