Small structs: interfacing with C++ potentially broken
Jan
Jan at Krassnigg.de
Mon Dec 20 19:35:52 UTC 2021
On Monday, 20 December 2021 at 11:58:03 UTC, Tim wrote:
> On Monday, 20 December 2021 at 10:24:00 UTC, Jan wrote:
>> Is this a known issue, or is there a way to instruct DMD to
>> use a specific calling convention for a given type?
>
> This looks like a bug. It seems to work without constructor in
> C++, but still crashes with a constructor in D. It also seems
> to work if a trivial destructor is added in D: ~this(){}
>
> This could be related to POD types in C++. Structs with
> constructor or destructor are probably passed differently, but
> dmd only looks at the destructor.
Well, that at least gives me a way to work around this issue.
More information about the Digitalmars-d-learn
mailing list