digitalmars.D.bugs - [Issue 12914] New: std.typecons.alignForSize will not accept
- via Digitalmars-d-bugs (38/38) Jun 13 2014 https://issues.dlang.org/show_bug.cgi?id=12914
https://issues.dlang.org/show_bug.cgi?id=12914 Issue ID: 12914 Summary: std.typecons.alignForSize will not accept immutable names argument Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: nobody puremagic.com Reporter: atrout chatham.edu // The following code compiles and works as expected. import std.typecons; struct X {} struct Y {} alias FieldTypes = TypeTuple!(X,Y); struct A { mixin(alignForSize!(FieldTypes)(["x","y"])); } // However, the following fails to compile, giving the message: // "Error: alignForSize (string[] names...) is not callable using argument types (immutable(char[][]))" immutable string[] fieldNames = ["x", "y"]; struct B { mixin(alignForSize!(FieldTypes)(fieldNames)); } // I think the problem is due to alignForSize having the incorrect signature: // string alignForSize(E...)(string[] names...); // If I'm not mistaken it should be something like: // pure string alignForSize(E...)(in string[] names...); // This is my first posted bug and I'm no D guru, so hopefully I'm not simply confused about something. Thanks! --
Jun 13 2014