← Back to index
|
Original Bugzilla link
Bug 7257 – std.typecons.Tuple of a immutable item
Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-01-09T12:43:00Z
Last change time
2013-02-09T21:48:54Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2012-01-09T12:43:06Z
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
Comment #1
by andrej.mitrovich — 2013-02-09T21:48:54Z
Fixed in 2.061.