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

[MSVC 8.0] type_info pollutes the global scope

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.1.2
    • None
    • External
    • None
    • MSVC 8.0

    Description

      From http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=4da481b4-42ed-481f-aa9d-023b531f3bfb:

      Bug Details: type_info pollutes the global scope
      ______________________________________________________________________
      Bug ID: FDBK40150
      Problem Type: Bug
      Status: Closed
      Resolution: Won't Fix
      Microsoft Status: Reviewed
      Opened Date: 2005-11-09 12:10:56
      Opened By: Martin Sebor

      Product/Technology: Visual C++
      Version: Visual Studio 2005
      Product Language: English
      Category: Libraries
      OS: Windows 2000 Professional
      OS Language: US English
      Submission Language: English
      ______________________________________________________________________
      Description:
      ______________________________________________________________________
      Opened by Martin Sebor on 2005-11-09 at 12:10:56

      The symbol type_info introduced by the C++ standard library into the global scope causes clashes with user-defined symbol of the same name.

      ______________________________________________________________________
      Resolved as Won't Fix by Microsoft on 2005-11-15 at 14:14:13
      ______________________________________________________________________

      Thank you for reporting this. When support was added for these templates, there were not a proper namespace support in the compiler. Changing this right now is not possible because of backward compatability. We would really like to fix this but unfortunately without other substantial changes we won't be able to do so.

      Thanks,
      Nikola Dudar
      Visual C++
      ______________________________________________________________________
      Steps to Reproduce:
      $ cat t.cpp && cl -EHsc -c t.cpp
      #include <iostream>

      template <class T>
      void type_info () { }
      Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
      Copyright (C) Microsoft Corporation. All rights reserved.

      t.cpp
      t.cpp(4) : error C2904: 'type_info' : name already used for a template in the current scope
      C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE\typeinfo(43) : see declaration of 'type_info'
      ______________________________________________________________________
      Actual Results: Compilation errors.
      Expected Results: No errors.

      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: