non virtual interfaces
Alexandr Druzhinin
drug2004 at bk.ru
Thu Sep 19 22:31:05 PDT 2013
if I use protected instead of private in interface like:
interface Transmogrifier
{
final void thereAndBack()
{
transmogrify();
untransmogrify();
}
protected:
void transmogrify();
void untransmogrify();
}
class CardboardBox: Transmogrifier
{
override protected void transmogrify() { }
override void untransmogrify() {}
}
int main()
{
auto cb = new CardboardBox();
return 0;
}
it compiles, but why does compiler permit making untransmogrify() be
public? How can I prohibit this? May be it just unrealized yet?
More information about the Digitalmars-d-learn
mailing list