Accessing types by context

Carl Vogel via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 28 20:50:35 PDT 2016


On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker 
wrote:
> Suppose one has void test(myEnum e)
>
> enum myEnum
> {
> A,B,C
> }
>
> [...]

Doesn't the with statement solve your problem here?

with (myEnum) {
     test(A);
     test(B);
     test(C);
}


More information about the Digitalmars-d mailing list