Article ID: 131203
Article Last Modified on 7/5/2005
APPLIES TO
- Microsoft Visual C++ 2.0 Professional Edition
- Microsoft Visual C++ 2.1
This article was previously published under Q131203
SYMPTOMS
A member function that is an ambiguous overload of another member function
of the class causes the compiler to generate a correct C2579 error message
to indicate that the parameter list is not sufficiently different to
overload the function. This behavior is as it should be.
However, in the error message, the scope resolution operator (::) is
missing between the class name and the function name used to indicate the
problem. For example, compiling the sample code shown in article causes the
compiler to generate this error :
error C2579: 'TestClassTestFunc(int)' : parameter list not
sufficiently different from
'TestClassTestFunc(const int)'
The error should look like this:
error C2579: 'TestClass::TestFunc(int)' : parameter list not
sufficiently different from
'TestClass::TestFunc(const int)'
This only happens with Visual C++, 32-bit Edition, versions 2.0 and 2.1.
This does not happen with Visual C++ version 1.0 for Windows NT nor does it
happen with the 16-bit versions of Visual C++.
NOTE: In Visual C++ 4.0, the text message of error C2579 has been
corrected. It now appears as follows:
error C2579: '<function_name>(<parameter_list1>)' :
parameter list not sufficiently different from
'<function_name>(<parameter_list2>)'
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem was corrected in Microsoft
Visual C++, 32-bit Edition, version 4.0.
Additional query words: 2.00 2.10 8.0 8.00 8.0c 8.00c 9.0 9.00 9.1 9.10
Keywords: kbbug kbfix kbcpponly kbcompiler KB131203