How to construct a struct that does not explicitly define a constructor
Paul Backus
snarwin at gmail.com
Sat Mar 1 14:37:53 UTC 2025
On Saturday, 1 March 2025 at 03:13:55 UTC, user1234 wrote:
> because the tuple-expression `(0,0.1)` is explicitly
> convertible to `Test`, based on the concept of "structural
> typing".
Even if D has tuples, I highly doubt that it will have this kind
of implicit conversion from tuples to structs. D is generally
very conservative about what implicit conversions it allows,
especially conversions to and from user-defined types (like
structs and classes).
More information about the Digitalmars-d-learn
mailing list