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

[MSVC 8] std::type_info declared in the wrong namespace

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.1.2
    • Fix Version/s: 4.1.3
    • Component/s: 18. Language Support
    • Labels:
      None
    • Environment:

      MSVC 8.0, Windows

      Description

      $ cat t.cpp && nmake -nologo t.exe
      #include <typeinfo>

      void foo (const std::type_info&) { }

      int main ()
      {
      foo (typeid (int));
      }

      cl -D_RWCONFIG=15d_msvc_8_0 -Ic:\contrib\cygwin\build\sebor\dev-hal/include -I.\..\..\..\../include -Ic:\contrib\cygwin\build\sebor\dev-hal\tests\stdlib\support/../include -Ic:/contrib/cygwin/build/sebor/dev-hal/include/ansi -I.\..\..\..\.. -Ic:\contrib\cygwin\build\sebor\dev-hal -Ic:\contrib\cygwin\build\sebor\dev-hal\tests\stdlib\support -I. -nologo -EHsc -Zc:wchar_t -MDd -W3 -Zi -GR -GF -RTC1 -D_CRT_SECURE_NO_DEPRECATE -c t.cpp
      t.cpp
      t.cpp(7) : error C2664: 'foo' : cannot convert parameter 1 from 'const type_info' to 'const std::type_info &'
      Reason: cannot convert from 'const type_info' to 'const std::type_info'
      No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
      NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2'
      Stop.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: