Private Nested Classes?

D Man email at example.org
Sun Mar 31 20:07:39 UTC 2019


Is it possible to have private inner nested classes?

For example if I have a class that is only ever used inside 
another class, it would make sense to be able to 'lock' it inside 
the outer class, so that raw instances of it cannot be created.

But in this example: https://run.dlang.io/is/PfemUV

The `private` specifier seems to have no meaning.

Is there a way to get the desired effect (make a nested class 
only accessable from within it's outer class)?


More information about the Digitalmars-d mailing list