Thread overview
[Issue 2985] New: Add enumToString and enumFromString to std.conv
May 15, 2009
rsinfu@gmail.com
May 15, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2985

           Summary: Add enumToString and enumFromString to std.conv
           Product: D
           Version: 2.029
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: patch
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: rsinfu@gmail.com


Created an attachment (id=368)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=368)
Adds enumToString and enumFromString

The patch adds new template functions enumToString and enumFromString to std.conv. These functions convert between an enum member value and its name, and do not require that enums should be defined by some template (cf. defineEnum).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 16, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2985


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|bugzilla@digitalmars.com    |andrei@metalanguage.com




--- Comment #1 from Andrei Alexandrescu <andrei@metalanguage.com>  2009-05-16 05:08:13 PDT ---
Looks great! I'll add the functions and credit for you in std.conv. Thank you, Shin!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 04, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2985


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Andrei Alexandrescu <andrei@metalanguage.com>  2009-07-03 21:14:21 PDT ---
I just merged Shin's implementation to std.conv and added his name to the list of authors for the module. Instead of adding enumToString and enumFromString, I had Shin's code replace the corresponding "to" functions directly. The feature will be part of the next release.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------