A collection of DIPs
Dominikus Dittes Scherkl via Digitalmars-d
digitalmars-d at puremagic.com
Tue Sep 8 23:13:58 PDT 2015
On Tuesday, 8 September 2015 at 17:07:50 UTC, NX wrote:
> And, can somebody show me a working example code of how to
> solve that friend class problem without some horrible hacktic
> way and agressive template/mixin stuff ? (I doubt it can solved
> via templates but anyway...)
Why would you ever need "friend"?
All functions have access to private members if they are declared
within the same module, so there "friend" is not needed. And if
you need access from outside the module, why do you declare them
"private"?
IMHO "friend" is a misconception, that is only there to
compensate for the lack of modules in C++.
More information about the Digitalmars-d
mailing list