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.
}