version: multiple conditions

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sat Jul 4 15:43:39 PDT 2015


On 7/4/2015 2:24 PM, Joakim wrote:
> I agree that mistyping and checking a large array of
> version constants can cause problems

It's one reason why this style is recommended:

     version (linux)
     {
	...
     }
     else version (Windows)
     {
	...
     }
     else
	static assert(0);



More information about the Digitalmars-d mailing list