[Issue 24880] to!string with inout enum argument fails to compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 26 18:45:25 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24880
--- Comment #1 from anonymous4 <dfj1esp02 at sneakemail.com> ---
private template enumRep(T, S, S value)
if (is (T == immutable) && isExactSomeString!T && is(S == enum))
{
static T enumRep = toStr!T(value);
}
If I mark the argument as immutable, then it compiles:
private template enumRep(T, S, immutable S value)
Presumably for enums it should be fine.
Invoking with enumRep!(immutable(T), immutable(S), member) works too.
--
More information about the Digitalmars-d-bugs
mailing list