Getting whether it's Tango or Phobos
Robert Fraser
fraserofthenight at gmail.com
Mon May 19 15:45:26 PDT 2008
Bill Baxter wrote:
> Robert Fraser wrote:
>> Is there a reliable way to deduce whether the user is using Tango or
>> Phobos? I used to use:
>>
>> static if(is(typeof(object.toUtf8)))
>>
>> But since that got changed to toString that doesn't work right now.
>> For the time being, I can verify it's D1 and then use (with Tango 0.99.6)
>>
>> static if(!is(typeof(string)))
>>
>> But I'm guessing Tango may be given a string type soon...?
>
> version(Tango) { ... } else { ... } ?
>
> --bb
That requires the user to specify -version=Tango . I'm looking for
something that can be compiled with either Tango or Phobos without
asking anything of the user.
More information about the Digitalmars-d-learn
mailing list