Default struct constructors if a struct member is a union
Steven Schveighoffer
schveiguy at gmail.com
Tue Jul 2 15:54:26 UTC 2024
On Saturday, 29 June 2024 at 23:33:41 UTC, solidstate1991 wrote:
>
> My usecase scenario doesn't really allow constructors for the
> struct, since it's a binding to an external library via C API.
BTW, this is not true. A constructor does not change the struct
layout or anything about it from the C side. You can safely add
the struct constructor (or any other struct member functions) and
the struct itself should be C compatible.
-Steve
More information about the Digitalmars-d-learn
mailing list