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

--- Comment #0 from 2012-01-09 12:43:06 PST ---
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
error instantiating

See also issue 7256

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to