BUG: Compiler Error C2955 Caused by Global STL Iterators (167323)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
This article was previously published under Q167323 SYMPTOMS
When you declare a global typedef of any STL iterator, the compiler error
C2955 occurs.
RESOLUTION
In the sample code below, replace:
typedef IntVector::iterator IT ;
with the following code:
// Workaround for VC++ 4.2:
#if _MSC_VER == 1020
struct X
{
typedef IntVector::iterator it ;
};
typedef X::it IT ;
#else
typedef IntVector::iterator IT ;
#endif
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Major | Last Reviewed: | 10/17/2003 |
---|
Keywords: | kbbug kbcode kbLangCPP kbProgramming KB167323 |
---|
|