isMutable doesn't work with enum ?

Temtaime temtaime at gmail.com
Sun Jun 2 15:34:49 PDT 2013


It's intresting.
So the only way to pass "a" to overloaded function like that ?

void foo(T)(ref T) { writeln("true"); }
void foo(T)(auto ref in T) { writeln("false"); }

enum int a = 10;
foo(a); // false

int b = 1;
foo(b); // true


More information about the Digitalmars-d-learn mailing list