“class::Identifier”不是“class”基类的成员
无法访问 Identifier
,因为它不是从任何基类继承的成员。
以下示例生成 C2602:
// C2602.cpp
// compile with: /c
struct X {
int x;
};
struct A {
int a;
};
struct B : public A {
X::x; // C2602 B is not derived from X
A::a; // OK
};