https://issues.dlang.org/show_bug.cgi?id=24880

--- Comment #1 from anonymous4 <[email protected]> ---
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.

--

Reply via email to