Using std.format required std.string?
Robert M. Münch via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Mar 15 11:03:55 PDT 2015
On 2015-03-15 17:36:24 +0000, Robert M. Münch said:
> Is there a way to use "version(...)" to have code sections depending on
> compiler version? Something like:
>
> version(dmd >= 2.067) or version(dmd < 2.067)?
Answerting myself:
static if (__traits(compiles, version_minor < 67))
import std.string; // format() for versions < 2.0.67
else
import std.format; // format() for versions >= 2.0.67
--
Robert M. Münch
http://www.saphirion.com
smarter | better | faster
More information about the Digitalmars-d-learn
mailing list