Defining a version after it's tested for

Robert Clipsham robert at octarineparrot.com
Fri May 22 03:14:48 PDT 2009


Tim Matthews wrote:
>  From what can I see you have a few different posssible versions but 
> when no version is defined you can select a default version based on 
> other stuff like windows operating system. Rather than modify the 
> versions or add aditional to match the system you can create complex 
> 'static if' statements which also are a compile time feature but can 
> have other static ifs and logical comparisons like '&&' and '||'. When 
> you have put the right checks in you can match your select target 
> systems all within a single static if.

Ah, I see what you mean now, you don't mean to use this on its own, but 
rather use it along with other tests, so rather than using a version 
identifier it would resolve to something internally which could be 
tested in a static if... this would work nicely actually, thanks!



More information about the Digitalmars-d mailing list