Thread overview
[Issue 16190] to!string on enum should be fully qualified for consistency
Jun 21, 2016
b2.temp@gmx.com
Jun 21, 2016
Timothee Cour
Mar 21, 2020
Basile-z
Dec 17, 2022
Iain Buclaw
June 21, 2016
https://issues.dlang.org/show_bug.cgi?id=16190

b2.temp@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com
           Hardware|x86                         |All
                 OS|Mac OS X                    |All

--- Comment #1 from b2.temp@gmx.com ---
I think that any fix directly in to() can break a lot of code because currently to!string and to!E work together. I'm sure that it's already used as it is now by many people.

The fix, if any, should maintain the old behvior and allow to get the identifier when explicitly needed, for example:

auto toImpl(T, S, bool fq = false)(auto ref E e)
if (is(S == enum) && is(T==string))
{}

with "fq" a CT bool that indicates if the output includes the "enum
identifier".
"Fully qualified" would mean that even the module name would be included so I
suppose that what you want is actually the enum identifier.

----

By the way why do you report this as a dmd (and not phobos) issue ?

--
June 21, 2016
https://issues.dlang.org/show_bug.cgi?id=16190

Timothee Cour <timothee.cour2@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2@gmail.com
          Component|dmd                         |phobos

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=16190

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=16190

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--
December 01
https://issues.dlang.org/show_bug.cgi?id=16190

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10185

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--