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