Getting whether it's Tango or Phobos
Bill Baxter
dnewsgroup at billbaxter.com
Mon May 19 01:46:30 PDT 2008
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
More information about the Digitalmars-d-learn
mailing list