schmidt@zola.ics.uci.edu (Doug Schmidt) (10/13/89)
The following code illustrates an interesting situation arising from
the combination of inheritance and static member functions.
----------------------------------------
class foo
{
public:
foo ();
static int foobar ();
};
class bar : private foo
{
public:
bar ();
};
class baz : private bar
{
public:
baz ()
{
// Is this call legal? In one sense it is illegal (if you follow
// the inheritance hierarchy). However, from another perspective
// foo::foobar () is a call to a static member function that is
// visible in the public section of class foo.
foo::foobar ();
}
};
----------------------------------------
Does cfront 2.0 `do the right thing' here, i.e., does it conform to
the language definition?
thanks,
Doug
--
Master Swordsman speak of humility; | schmidt@ics.uci.edu (ARPA)
Philosophers speak of truth; | office: (714) 856-4034
Saints and wisemen speak of the Tao of no doubt;
The moon, sun, and sea speaks for itself. -- Hiroshi Hamada