コンパイラの警告 (レベル 4) C4516
'class::symbol': access 宣言の使用は避けてください; メンバー using 宣言を使用してください。
access 宣言 (派生クラスで、using キーワードを使わずにメンバーのアクセスを変更すること) は古い宣言であると、ANSI C++ 委員会が明言しています。 将来のバージョンの C++ では、access 宣言がサポートされない可能性があります。
次の例では C4516 が生成されます。
// C4516.cpp
// compile with: /W4
class A
{
public:
void x(char);
};
class B : protected A
{
public:
A::x; // C4516 on access-declaration
// use the following line instead
// using A::x; // using-declaration, ok
};
int main()
{
}