minwin (combining version & static if)

Thomas Kuehne thomas-dloop at kuehne.cn
Tue Nov 28 23:24:11 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tomas Lindquist Olsen schrieb am 2006-11-29:
> Bill Baxter wrote:
>> Tomas Lindquist Olsen wrote:
>> 
>>> Read http://digitalmars.com/d/version.html#version : Version 
>>> Specification
>> 
>> Thanks. :-)
>> 
>> But I don't see how I specify that I want MY_COOL_LIB_VER > 010205.
>> I can only say I want 'version' to be >= 010205.  But version of what?
>> 
>> For checking versions of specific libs , and for defining new versions 
>> contingent on existing versions, it still looks like I need a static if.
>> 
>> --bb
> I really think you're leaving the scope of version now and entering 
> if/static if

You can combine both.

config.d:
#
# version(Windows){
#	const int WAPI_FEATURE = 3;
# }
#

some_code.d:
#
# import config;
#
# static if(is(typeof(WAPI_FEATURE)) && WAPI_FEATURE == 3){
# 	// ...
# }
#

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFFbUI8LK5blCcjpWoRAn5TAJ42e7sOSDHpp+ybDmicTm8Wyqc4DwCeLBcM
Q02laQLngiwKSzRn/EYjYMg=
=+DJ8
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-announce mailing list