www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12914] New: std.typecons.alignForSize will not accept


          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

// 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

// 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