On 7/15/21 5:46 PM, Ali Çehreli wrote:
> On 7/15/21 11:24 AM, Tejas wrote:
> > package(qualifiedIdentifier)
> Just don't do it
Ok, I said all that before realizing what you needed with transpiling
C++ to D and the solution of package(qualifiedIdentifier). (And
package(qualifiedIdentifier) i
On 7/15/21 11:24 AM, Tejas wrote:
> it seems like seperating chunks of C++ code into seperate modules
> and using the
> ```d
> package(qualifiedIdentifier)
> ```
> access specifier seems to be the way to go.
That would be necessary if one agreed with C++'s 'private' to begin
with. In other word
On Thursday, 15 July 2021 at 18:06:26 UTC, Steven Schveighoffer
wrote:
On 7/15/21 1:43 PM, Tejas wrote:
How do you write the equivalent of that in D? Is the answer
still the same? Manually keep it in the same module, or is
there a programmatic way of converting this to D?
Functions in the sa
On Thursday, 15 July 2021 at 18:11:30 UTC, evilrat wrote:
On Thursday, 15 July 2021 at 17:49:06 UTC, Tejas wrote:
I'm sorry, I should've explicitly mentioned I'm interested in
learning how to do friend injection in D.
I know that access specifiers operate at module scope, seen a
few posts
On Thursday, 15 July 2021 at 17:49:06 UTC, Tejas wrote:
I'm sorry, I should've explicitly mentioned I'm interested in
learning how to do friend injection in D.
I know that access specifiers operate at module scope, seen a
few posts about that here already.
Thank you for answering though.
On 7/15/21 1:43 PM, Tejas wrote:
How do you write the equivalent of that in D? Is the answer still the
same? Manually keep it in the same module, or is there a programmatic
way of converting this to D?
Functions in the same module can access `private` members. Functions in
the same package (
On Thursday, 15 July 2021 at 17:30:05 UTC, jfondren wrote:
On Thursday, 15 July 2021 at 17:21:45 UTC, Tejas wrote:
I can do it like this in C++:
```
template
class def
{
friend typename abc;
}
```
I am just hopelessly confused on how to achieve the same in D.
Uncharitably: D is a friendle
If, however, you're trying to inject friend access to something
outside def's module, then you might want to reconsider what
you're trying to accomplish and whether it can be done
differently.
Was just dreaming of how to transpile C++ code to D :(
Curiously enough, friend injection w
On Thursday, 15 July 2021 at 17:26:41 UTC, Adam D Ruppe wrote:
On Thursday, 15 July 2021 at 17:21:45 UTC, Tejas wrote:
I can do it like this in C++:
You don't just put class def and class abc in the same module
and you get the same effect though.
I really should've just posted the whole thi
On Thursday, 15 July 2021 at 17:21:45 UTC, Tejas wrote:
I can do it like this in C++:
```
template
class def
{
friend typename abc;
}
```
I am just hopelessly confused on how to achieve the same in D.
Uncharitably: D is a friendless language. Charitably: D is so
much more friendly that in
On Thu, Jul 15, 2021 at 05:21:45PM +, Tejas via Digitalmars-d-learn wrote:
> I can do it like this in C++:
> ```
> template
> class def
> {
> friend typename abc;
> }
> ```
>
> I am just hopelessly confused on how to achieve the same in D.
D does not have `friend` declarations. Equivalent
On Thursday, 15 July 2021 at 17:21:45 UTC, Tejas wrote:
I can do it like this in C++:
You don't just put class def and class abc in the same module and
you get the same effect though.
I can do it like this in C++:
```
template
class def
{
friend typename abc;
}
```
I am just hopelessly confused on how to achieve the same in D.
13 matches
Mail list logo