Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-803

[MSVC] error on std::bitset ctor in 23.bitset.cpp

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.2.1
    • Component/s: Tests
    • Labels:
      None
    • Environment:

      MSVC 8, 9

    • Severity:
      Compiler Error

      Description

      In stdcxx 4.2.0 as well as on the head of trunk, the test 23.bitset fails to compile with both MSVC 8.0 and 9.0 with errors similar to the one below.

      Compiling...
      23.bitset.cpp
      ..\..\..\..\tests\containers\23.bitset.cpp(753) : warning C4624: 'std::char_traits<UserChar>' : destructor could not be generated because a base class destructor is inaccessible
      ..\..\..\..\tests\containers\23.bitset.cpp(842) : warning C4244: 'return' : conversion from '__int64' to 'int', possible loss of data
      ..\..\..\..\tests\containers\23.bitset.cpp(401) : error C2668: 'std::bitset<_Size>::bitset' : ambiguous call to overloaded function
              with
              [
                  _Size=0x00
              ]
              $(TOPDIR)\include\bitset(287): could be 'std::bitset<_Size>::bitset(long)'
              with
              [
                  _Size=0x00
              ]
              $(TOPDIR)\include\bitset(283): or       'std::bitset<_Size>::bitset(unsigned int)'
              with
              [
                  _Size=0x00
              ]
              $(TOPDIR)\include\bitset(279): or       'std::bitset<_Size>::bitset(int)'
              with
              [
                  _Size=0x00
              ]
              $(TOPDIR)\include\bitset(161): or       'std::bitset<_Size>::bitset(unsigned long)'
              with
              [
                  _Size=0x00
              ]
              while trying to match the argument list '(const size_t)'
              ..\..\..\..\tests\containers\23.bitset.cpp(1303) : see reference to function template instantiation 'void test_ctors<0x00>(const std::bitset<_Size> *)' being compiled
              with
              [
                  _Size=0x00
              ]
              ..\..\..\..\tests\containers\23.bitset.cpp(1322) : see reference to function template instantiation 'void run_test<0x00>(const std::bitset<_Size> *)' being compiled
              with
              [
                  _Size=0x00
              ]
      ..\..\..\..\tests\containers\23.bitset.cpp(417) : error C2678: binary '==' : no operator found which takes a left-hand operand of type 'const std::bitset<_Size>' (or there is no acceptable conversion)
              with
              [
                  _Size=0x00
              ]
              C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\guiddef.h(192): could be 'int operator ==(const GUID &,const GUID &)'
              $(TOPDIR)\include\bitset(433): or       'bool std::bitset<_Size>::operator ==(const std::bitset<_Size> &) const'
              with
              [
                  _Size=0x00
              ]
              while trying to match the argument list '(const std::bitset<_Size>, const size_t)'
              with
              [
                  _Size=0x00
              ]
      

        Attachments

        1. bitset.log
          42 kB
          Martin Sebor

          Issue Links

            Activity

              People

              • Assignee:
                farid Farid Zaripov
                Reporter:
                sebor Martin Sebor
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: