protection for superclass
Sean Kelly
sean at f4.ca
Sun May 7 11:54:39 PDT 2006
Frank Benoit wrote:
> If I do this
>
> class T : private D {
> }
>
> the functionality from Object is no more visible to a user of T.
> e.g. container can complain, they cannot access opEqual. Is this the
> wanted behaviour?
I'd say it is, as in some cases this might actually be desirable. The
class could still be compared as an Object:
Object o = new T;
Object p = o;
assert( o == p );
Sean
More information about the Digitalmars-d
mailing list