[Issue 5013] std.typecons.Tuple should have constructor for static arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 22 09:13:48 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=5013


Jakob Ovrum <jakobovrum at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakobovrum at gmail.com


--- Comment #2 from Jakob Ovrum <jakobovrum at gmail.com> 2012-04-22 09:14:47 PDT ---
(In reply to comment #1)
> (In reply to comment #0)
> 
> > This leaves the reverse conversion unimplementable. A way out can be:
> > 
> > Tuple!(int, int) t;
> > auto ints = to!(int[2])(t);
> 
> Or:
> 
> auto ints = cast(int[2]) t;
> 
> Seems more appropriate as no conversion takes place.

Structs can have padding, while static arrays cannot.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list