BUG: Using Declaration Causes C2327Last reviewed: June 12, 1997Article ID: Q167351 |
The information in this article applies to:
SYMPTOMSA using declaration causes the following error:
error C2327: 'B::A::T2' : member from enclosing class is not a type name, static, or enumerator CAUSEThe name specified in a using declaration has the same name as an identifier in the template argument list of a templated class.
RESOLUTIONModify the name in the using declaration or modify the name of the identifier in the template argument list (see sample code below).
STATUSMicrosoft 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.
MORE INFORMATION
Sample Code
// Sample Code that causes the error. template <class T1> struct A { int x; T1 y; int T2; }; template <class T2> struct B : A<T2> { using A<T2>::T2; }; // Sample Code that works around the error by changing the template // argument list. template <class T1> struct A { int x; T1 y; int T2; }; template <class T3> struct B : A<T3> { using A<T3>::T2; }; |
Keywords : CPPIss kbcode kbtool vcbuglist500 kbbuglist
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |