[Issue 19179] extern(C++) small-struct by-val uses wrong ABI
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 10 09:11:17 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=19179
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |INVALID
--- Comment #7 from Walter Bright <bugzilla at digitalmars.com> ---
Default initialization in C++ doesn't make it non-POD. And I added the
`extern(C++)` to the test cases that Manu had omitted.
Is the actual problem trying to create a non-POD struct in D that is compatible
with a non-POD struct in C++?
As to how to make a POD in D without a default constructor, just add a trivial
postblit:
this(this) { }
and it will be not POD.
If there's still a problem, please file a new report explaining what that is
rather than reopening this as a different issue.
--
More information about the Digitalmars-d-bugs
mailing list