Reply to Jarrett, > If the static if is not at global scope, you can make a variable that > points to the member: > > const bool pick = false; > > struct S > { > int i; > int j; > } > void main() > { > S* s; > static if(pick) > int* var = &s.i; > else > int* var = &s.j; > } That's what I'm trying to avoid. :(