On Tue, 05 Oct 2010 03:25:03 -0400, Jacob Carlborg <d...@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

Reply via email to