[Issue 5515] std.conv.to for safer enum casts

2018-05-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5515 Dmitry Olshansky changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 5515] std.conv.to for safer enum casts

2016-10-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5515 Andrei Alexandrescu changed: What|Removed |Added Keywords||bootcamp

[Issue 5515] std.conv.to for safer enum casts

2013-02-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5515 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 5515] std.conv.to for safer enum casts

2013-02-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5515 --- Comment #3 from bearophile_h...@eml.cc 2013-02-17 16:04:00 PST --- (In reply to comment #2) Implemented in Issue8143. *** This issue has been marked as a duplicate of issue 8143 *** Given that Enums with floating-point or string base

[Issue 5515] std.conv.to for safer enum casts

2013-02-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5515 --- Comment #4 from bearophile_h...@eml.cc 2013-02-17 16:33:03 PST --- But probably this should be supported: import std.conv: to; enum Foo : char { A = 'a' } void main() { dchar d = 'a'; Foo f = to!Foo(d); } Currently it gives:

[Issue 5515] std.conv.to for safer enum casts

2013-02-17 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5515 Andrej Mitrovic andrej.mitrov...@gmail.com changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 5515] std.conv.to for safer enum casts

2011-08-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5515 --- Comment #1 from bearophile_h...@eml.cc 2011-08-18 14:51:07 PDT --- This enhancement request comes from a handy feature of the Ada language. It's not too much hard to implement something similar in D too, with I think an acceptable final