Small structs: interfacing with C++ potentially broken

Tejas notrealemail at
Mon Dec 20 12:01:01 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.

I think it's got something to do with 

More information about the Digitalmars-d-learn mailing list