Is there a simple way to to do this? enum A{ a1, a2 }
void fun(A a){...} void test(){ fun(A.a1); //works fun(a1); //I'd like a1 to work, but just where an A is expected to avoid polluting namespace. }
Timothee Cour via Digitalmars-d-learn Tue, 05 Aug 2014 23:18:27 -0700
Is there a simple way to to do this? enum A{ a1, a2 }
void fun(A a){...} void test(){ fun(A.a1); //works fun(a1); //I'd like a1 to work, but just where an A is expected to avoid polluting namespace. }