digitalmars.D.bugs - [Issue 7256] New: std.typecons.Nullable of a const value
- d-bugmail puremagic.com (36/36) Jan 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7256
- d-bugmail puremagic.com (6/6) Jan 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7256
- d-bugmail puremagic.com (12/12) Feb 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=7256
http://d.puremagic.com/issues/show_bug.cgi?id=7256 Summary: std.typecons.Nullable of a const value 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 --- Comment #0 from bearophile_hugs eml.cc 2012-01-09 12:40:23 PST --- I think std.typecons.Nullable should sopport a const value too, if possible: import std.typecons: Nullable; const struct Foo {} Nullable!Foo bar() { Foo f; return Nullable!Foo(f); } void main() {} DMD 2.058 Head: ...\dmd2\src\druntime\import\object.di(454): Error: function object.TypeInfo.destroy (void* p) is not callable using argument types (const(Foo)*) ...\dmd2\src\druntime\import\object.di(454): Error: cannot implicitly convert expression (&obj) of type const(Foo)* to void* ...\dmd2\src\phobos\std\typecons.d(1188): Error: template instance object.clear!(const(Foo)) error instantiating test.d(3): instantiated from here: Nullable!(const(Foo)) ...\dmd2\src\phobos\std\typecons.d(1198): Error: can only initialize const member _value inside constructor -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7256 --- Comment #1 from bearophile_hugs eml.cc 2012-01-09 12:43:40 PST --- See also issue 7257 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 09 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7256 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |WORKSFORME --- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-02-09 21:49:35 PST --- Fixed in 2.059. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 09 2013