FIX: Ambiguous C2966 Error with Nested Template Classes (139458)
The information in this article applies to:
- The Compiler included with Microsoft Visual C++, 32-bit Edition
This article was previously published under Q139458 SYMPTOMS
An ambiguous C2966 error is generated if any members of a nested template
class are defined externally. The sample code shown in the "More
Information" section of this article reproduces this problem and gives the
following error message:
error C2966: '<Unknown>' : adding member function of same name as
existing static data member for template class 'Outer'
RESOLUTION
Define members of a nested template class inline only.
NOTE: external definitions with the inline keyword will still generate the
ambiguous C2966 error.
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: | Major | Last Reviewed: | 7/30/2001 |
---|
Keywords: | kbbug kbLangCPP kbVC500fix KB139458 |
---|
|