digitalmars.D.learn - Friend class and methods
- Maxime Chevalier-Boisvert (3/3) Jun 12 2013 Does D have something like the concept of friend classes and
- David Nadlinger (5/8) Jun 12 2013 No (t really), you have to stick the two classes into the same
- Adam D. Ruppe (5/7) Jun 12 2013 The closest is to put both classes and the function in the same
- Maxime Chevalier-Boisvert (1/4) Jun 12 2013 Good enough for my needs. Thanks.
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (3/7) Jun 12 2013 Sometimes 'package' is more suitable than 'private'.
Does D have something like the concept of friend classes and functions in C++? I'd like to have a function that can access private members of two classes at the same time.
Jun 12 2013
On Wednesday, 12 June 2013 at 19:01:24 UTC, Maxime Chevalier-Boisvert wrote:Does D have something like the concept of friend classes and functions in C++? I'd like to have a function that can access private members of two classes at the same time.No (t really), you have to stick the two classes into the same module. David
Jun 12 2013
On Wednesday, 12 June 2013 at 19:01:24 UTC, Maxime Chevalier-Boisvert wrote:Does D have something like the concept of friend classes and functions in C++?The closest is to put both classes and the function in the same module. Things all in the same module can see the private members of each other.
Jun 12 2013
The closest is to put both classes and the function in the same module. Things all in the same module can see the private members of each other.Good enough for my needs. Thanks.
Jun 12 2013
On 06/12/2013 12:12 PM, Maxime Chevalier-Boisvert wrote:Sometimes 'package' is more suitable than 'private'. AliThe closest is to put both classes and the function in the same module. Things all in the same module can see the private members of each other.Good enough for my needs. Thanks.
Jun 12 2013