The magic of with statements! enum A { a1, a2 }void func(A a){} void main(){ func(A.a1); with(A) { func(a1); } }
And if you want to be *really* concise: with (A) fun(a1);
Meta via Digitalmars-d-learn Wed, 06 Aug 2014 08:34:11 -0700
The magic of with statements! enum A { a1, a2 }void func(A a){} void main(){ func(A.a1); with(A) { func(a1); } }
And if you want to be *really* concise: with (A) fun(a1);