Please,
Why does:
```
// Test module Ex_mod
struct SA {
int SAIntFld1;
int SAIntFld2;
}
bool AddEle(ref void* StartPtr, SA PayLoad1) {
import core.stdc.stdlib : malloc;
struct Ele {
SA PayLoad;
Ele* EleNxtPtr;
Ele* ElePrvPtr;
}
Ele*ElePtr;
Ele*
You have two ``SA`` structs, each in different encapsulations.
Each of them are different, even if they have similar members.
In D types that look the same do not combine, they are distinct.
You can see this by comparing the mangling of each.
``pragma(msg, SA.mangleof);``
On Wednesday, 22 November 2023 at 16:11:03 UTC, Richard (Rikki)
Andrew Cattermole wrote:
You have two ``SA`` structs, each in different encapsulations.
Each of them are different, even if they have similar members.
In D types that look the same do not combine, they are distinct.
You can see th
On 23/11/2023 5:34 AM, DLearner wrote:
Is the encapsulation issue resolved if the struct itself is held in
another module, and imported from that module into both the 'main' and
'Ex_mod' files?
Each module is its own encapsulation unit.
As long as you are using the same distinct type in both
On Wednesday, 22 November 2023 at 16:51:54 UTC, Richard (Rikki)
Andrew Cattermole wrote:
On 23/11/2023 5:34 AM, DLearner wrote:
Is the encapsulation issue resolved if the struct itself is
held in another module, and imported from that module into
both the 'main' and 'Ex_mod' files?
Each modul
Just for fun, I'm trying to implement an alternative base library
to avoid template/mixin/static/traits code with only one
objective: make "intelliSense" code analyzers tasks easier.
I need "Generics"... but D has not generics: I use templates in
the "simplest" possible way
I.E.:
```d
inte
On Wednesday, 22 November 2023 at 17:53:15 UTC, Antonio wrote:
Basically, it doesn't know witch version of ```filter``` to
use, because it is inferring `i=>i%2==0` is `void` ?!?!?!
```
!()(IIterable!int, void)
```
If I explicitly write `(int i)=>i%2==0`, it compiles correctly
again.
**Is it
denis via Digitalmars-d-learn wrote:
On Monday, 20 November 2023 at 07:50:22 UTC, thinkunix wrote:
denis via Digitalmars-d-learn wrote:
```
$ zypper install dmd
$ dmd main.d
Error: cannot find source code for runtime library file 'object.d'
dmd might not be correctly installed. Run 'dmd