Using closure in function scope to make "real" private class members

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Jun 5 21:40:18 UTC 2022


On Sunday, 5 June 2022 at 20:42:59 UTC, Dom Disc wrote:
> You don't need to re-declare the class. You can simply 
> overwrite a friend function.

Not exactly sure by what you mean by overwrite, you mean defining 
the function twice?

Encapsulation does not protect against sabotage, only against 
mistakes.



More information about the Digitalmars-d mailing list