Module-level accessibility
Steven Schveighoffer
schveiguy at yahoo.com
Tue Oct 5 05:40:42 PDT 2010
On Tue, 05 Oct 2010 03:25:03 -0400, Jacob Carlborg <doob at me.com> wrote:
> Who says we need to implement it as g++ does? DMD could implement it to
> not allow that.
The derived class controls everything. You cannot take control away from
the derived class, it just can't be done:
class A
{
private void cantCallMe();
}
class B : A
{
override private void cantCallMe() { butICanCallYou(); }
private void butICanCallYou() { /* do impl */ }
}
so far, private virtual functions == annoyance. I haven't seen anything
to prove otherwise yet.
-Steve
More information about the Digitalmars-d
mailing list