<div dir="ltr">Is there a simple way to to do this?<div><br></div><div>enum A{</div><div>a1,</div><div>a2</div><div>}</div><div><br></div><div>void fun(A a){...}</div><div>void test(){</div><div> fun(A.a1); //works</div><div>
 fun(a1); //I'd like a1 to work, but just where an A is expected to avoid polluting namespace.</div><div>}<br></div><div><br></div><div><br></div></div>