>> 
>> 
>> 
>> 
>> 
> D's private is different than some other languages (e.g. C++). 'private' 
> provides access to the entire module.
> 
> public: no access limitation
> 
> private: access by the module
> 
> package: access by the modules of the package
> 
> protected: access by the inheriting classes

But it works even if class Foo declarated in dufferent module.

Also this code works:

module a;

private { struct S {int a;}}

--------

module b:
import a:

void f() {S s; s.a=42;}

Reply via email to