Topic: new protected: restriction
Author: imp@boulder.parcplace.com (Warner Losh)
Date: Tue, 3 May 1994 23:08:40 GMT Raw View
There is a new restriction on protected: members that didn't use to be
in place, and I'd like to know the reasoning behind it (it breaks some
of our code, but that isn't that huge a deal in this one case).
Specifically, code that looks like
class B {
protected: void f();
};
class D : public B {
void foo()
};
D::foo()
{
pmf = &B::f; // Used to be legal, now (Sept 93 draft) isn't
pmf = &D::f; // Legal in ARM and ANSI
}
I'm wondering why the change was needed. I've scratched my head
trying to think of where this may cause problems, but can't seem to
find a good example.
Can someone who knows what is going on help me out here?
Warner
--
Warner Losh imp@boulder.parcplace.COM ParcPlace Boulder
"... but I can't promote you to "Prima Donna" unless you demonstrate a few
more serious personality disorders"