Thread overview | |||||
---|---|---|---|---|---|
|
July 09, 2011 [Issue 6275] New: Const values in tuples | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6275 Summary: Const values in tuples Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: major Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-07-08 18:09:16 PDT --- I think the need to put const values inside tuples is very common: import std.typecons; void main() { const int x = 1; auto t1 = tuple(x); alias Tuple!(const(int)) T; auto t2 = T(1); } In DMD 2.054beta this gives: ...\dmd\src\phobos\std\typecons.d(666): Error: can only initialize const member _field_field_0 inside constructor test.d(4): Error: template instance std.typecons.tuple!(const(int)) error instantiating -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 16, 2011 [Issue 6275] Const values in tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6275 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-09-16 13:19:06 PDT --- https://github.com/D-Programming-Language/phobos/pull/264 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 16, 2011 [Issue 6275] Const values in tuples | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6275 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from bearophile_hugs@eml.cc 2011-09-16 14:04:54 PDT --- Thank you. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation