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

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

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 4.1.2
    • 4.1.3
    • 18. Language Support
    • None
    • 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

              sebor Martin Sebor
              sebor Martin Sebor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment