[Issue 13728] std.conv.to for POD structs
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Dec 17 14:15:54 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13728
--- Comment #3 from bearophile_hugs at eml.cc ---
(In reply to John Colvin from comment #2)
> Why not non-POD structs and classes too?
To keep this Enhancement simple and well defined. Further extensions and
enhancements are possible later.
> Also, what do you think about situations where only a few of the members are
> set:
>
> struct A { int a, b, c; }
> auto a = A(3, 4);
>
> is completely valid, but would you want to allow
>
> auto a = [3, 4].to!A;
>
> ?
Seems possible, but also adds complexity to the proposal, so better to keep
things simple at first.
--
More information about the Digitalmars-d-bugs
mailing list