Using std.format required std.string?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 16 07:04:31 PDT 2015


On Mon, 16 Mar 2015 12:32:01 +0100, Robert M. Münch wrote:

> I prefer to move things to the "far future compatibility" path ASAP.
> Reduce a lot of maintenance headaches.

then you can check properties, not versions. ;-)

static if (__traits(compiles, {import std.string : format;})) {
  import std.string : format;
} else {
  import std.format : format;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150316/3808508e/attachment.sig>


More information about the Digitalmars-d-learn mailing list