extern(C++) and struct (constness mangling problem ?)

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Nov 29 10:52:12 PST 2011


On 11/29/11 10:50 AM, deadalnix wrote:
> 2/ Use that stract/class as a value type. You can do POD, but also
> define constructor and destructor, copy constructor and overload
> assignement. Anyway, you'll never be able to use proper polymorphism
> here, because it would require virtual destructor at least. This is IMO,
> what D's struct should achieve.

Yes.

> The 2/ case is overly used in almost any C++ program. And D struct
> should be able to match them. It wouldn't require much to make it working :
> - Default constructor.

No.

> - The hability to define opAssign for it's own type if this(this) is
> disabled.

Yes. That's a bug. Could you please file?


Thanks,

Andrei


More information about the Digitalmars-d mailing list