Topic: using" declarations
Author: "Alan J. Livingston" <AlanLivingston@acm.org>
Date: 1997/01/24 Raw View
I have a question about "using" declarations.
Say I have three classes A, B, C:
class A {
public:
A ();
~A ();
void f ();
};
class B : public A {
public:
B ();
~B ();
void f (int b);
};
class C : public B {
public:
C ();
~C ();
using A::f;
using B::f;
void f (char c);
};
My question is, in class C, is the "using A::f;" declaration legal? The
April '95 draft says:
"A using-declaration used as a member-declaration shall refer to a
member of a base class of the class being defined"
However, my compiler (MSVC++ v4.2B) whines about A not being a "direct"
base class of C. Is a point where my compiler doesn't comply with the
standard?
-Alan
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]