Is this expected? default to public members in private class

2015-05-03 Thread Dan Olson via Digitalmars-d-learn
It seems a private class or struct defaults to public members. Just curious if this is intended. I would have expected private all the way down unless overriden. --- plugh.d module plugh; auto makeFoo() {return new Foo;} private: class Foo { void maybepriv() {} private void priv() {}

Re: Is this expected? default to public members in private class

2015-05-03 Thread ketmar via Digitalmars-d-learn
On Sun, 03 May 2015 18:07:20 -0700, Dan Olson wrote: > It seems a private class or struct defaults to public members. Just > curious if this is intended. I would have expected private all the way > down unless overriden. i bet it is intended. protection of struct/class members is independed of

Re: Is this expected? default to public members in private class

2015-05-04 Thread Dan Olson via Digitalmars-d-learn
ketmar writes: > On Sun, 03 May 2015 18:07:20 -0700, Dan Olson wrote: > >> It seems a private class or struct defaults to public members. Just >> curious if this is intended. I would have expected private all the way >> down unless overriden. > > i bet it is intended. protection of struct/class