www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13254] New: Cannot instantiate std.container.Array with


          Issue ID: 13254
           Summary: Cannot instantiate std.container.Array with immutables
                    as T
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: maidenphil hotmail.com

Using dmd distribution 2.065. This does not compile:

std.container.Array!(immutable(dchar)) array;


The error seems to be caused because Array.Payload uses destroy on an immutable
type and that makes the compiler cry. I see that the code has been updated to
support "elaborate destructors", but I don't think it will prevent the problem.


Aug 04 2014