[Issue 5515] std.conv.to for safer enum casts
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sun Feb 17 16:46:54 PST 2013
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=5515
Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |
--- Comment #5 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-02-17 16:46:53 PST ---
(In reply to comment #4)
> 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);
> }
Ok. Reopening issue.
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list