www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7257] New: std.typecons.Tuple of a immutable item

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7257

           Summary: std.typecons.Tuple of a immutable item
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



I think std.typecons.Tuple should sopport a immutable item too, if possible:


import std.typecons: Tuple;
alias immutable(char)[5] Foo;
Tuple!(Foo) bar() {
    Foo f;
    return Tuple!(Foo)(f);
}
void main() {}


DMD 2.058 Head:

...\dmd2\src\phobos\std\typecons.d(383): Error: slice this._field_field_0[] is
not mutable
test.d(5): Error: template instance
std.typecons.Tuple!(immutable(char[5u])).Tuple.__ctor!(immutable(char[5u]))
error instantiating


See also issue 7256

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7257


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |WORKSFORME



21:48:54 PST ---
Fixed in 2.061.

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