Article ID: 148808
Article Last Modified on 7/5/2005
/* Compile options needed: None
*/
template <class T>
class Base
{
public:
T data;
int i;
};
template <class T>
class Derived : public Base<T>
{
public:
int j;
};
template <class T>
void AFunction(Base<T>* b)
{
return;
}
void main()
{
// Uncomment one of the following two statements to work around the
// problem. If the template class definition is in a header file,
// you may want to include one of the following two statements at
// the end of that file.
// template Derived<int>;
// Derived<int> dummy;
Derived<int> *j;
AFunction(j); // Gives C2670 here
}
Additional query words: 4.00
Keywords: kbbug kbfix kbcpponly kbcode kbcompiler KB148808