Bug 4674 – Change std.typecons.alignForSize's signature to (string[] names...)

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-08-18T04:51:00Z
Last change time
2011-06-02T08:33:21Z
Assigned to
andrei
Creator
kennytm

Comments

Comment #0 by kennytm — 2010-08-18T04:51:16Z
By the Phobos doc, alignForSize's signature was chosen to be char[] alignForSize(E...)(string[E.length] names); because of issue 2029. Now that 2029 is fixed, it should be possible to change it back to char[] alignForSize(E...)(string[] names...); In fact, the given example struct Banner { mixin(alignForSize!(byte[6], double)(["name", "height"])); } won't even work on the current version of D as the array literal returns a string[] instead of string[2].
Comment #1 by kennytm — 2011-03-06T12:37:26Z