FIX: Error C2579 When Using Function Templates (122789)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Editions 4.2
This article was previously published under Q122789 SYMPTOMS
When compiling function templates that contain a literal character, the
compiler may complain about 'ambiguous' parameter lists. Visual C++ version
4.0 may generate the following error:
error C2579: 'identifier1' : parameter list not
sufficiently different from 'identifier2'
Visual C++ version 2.x may generate the following errors:
error C2579: 'identifier1' : parameter list not
sufficiently different from 'identifier2'
fatal error C1903: unable to recover from previous
error(s); stopping compilation
RESOLUTION
Explicitly type cast the literal character with "(char)" to eliminate this
error. For example, in the sample code provided below, cast the literal
character 'c' to (char)'c' to work around the problem.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug was corrected in Visual C++
version 5.0.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbbug kbCompiler kbCPPonly kbfix kbVC500fix KB122789 |
---|
|