version and debug statements

Walter Bright newshound at digitalmars.com
Thu May 11 19:33:31 PDT 2006


Derek Parnell wrote:
> On Thu, 11 May 2006 18:24:17 -0700, Walter Bright wrote:
>> I suggest:
>>
>> 	version (Windows)
>> 		... windows code ...
>> 	else
>> 		static assert(0);
> 
> However, the important thing is to convey information to code maintainers.
> And the most direct and simplest way is to have this at the TOP of your
> source code ...
> 
>   version (Windows)
>   else {
>         pragma(msg, "Only compilable in Windows environment.");
> 	static assert(0);
>   }
> 
>   ... windows code ...

I suggest that if the entire module was windows only, put it under a 
windows package.



More information about the Digitalmars-d mailing list