Search

type_info::before returns type of int and not bool by Martin Richter

Closed
as Fixed Help for as Fixed

3
0
Sign in
to vote
Type: Bug
ID: 596771
Opened: 9/10/2010 4:32:01 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
The function type_info::before returns type int.
The standard http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf defines tis function in the class type_info as bool!
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010

What category (if any) best represents this feedback?

Compatibility

Steps to reproduce

Just look into the defines
C:\Program Files\Microsoft Visual Studio 10.0\VC\include\typeinfo
file.

The code showsreturn type int
    _CRTIMP_PURE int __CLR_OR_THIS_CALL before(const type_info& _Rhs) const;

Product Language

English

Operating System

Windows 7

Operating System Language

German

Actual results

Not compatible to the standard!

Expected results

Compatibility to the standard!
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 10/31/2010 at 10:27 PM
Hi,

Thanks for reporting this bug. We've fixed it, so that type_info::before() returns bool as required by C++98/03 and C++0x, and the fix will be available in VC11.

If you have any further questions, feel free to E-mail me at stl@microsoft.com .

Stephan T. Lavavej
Visual C++ Libraries Developer
Posted by Martin Richter on 9/10/2010 at 9:33 AM
See Chapter 18.5.1, page 406 in the working draft Standard
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf
Sign in to post a workaround.