Thanks, I know with statement could be used but I was hoping for a solutionnot involving adding syntax to call site.
If you control the declaration of the enum, you could write: alias a1 = A.a1; alias a2 = A.a2; A bit tedious, but it works, and could be automated if need be.