added 'since' template for further stdlib additions

This commit is contained in:
Andreas Rumpf 2019-11-07 12:02:26 +01:00
commit 372b01711e
2 changed files with 5 additions and 1 deletions

View file

@ -48,3 +48,7 @@ when defined(nimlocks):
{.pragma: benign, gcsafe, locks: 0.}
else:
{.pragma: benign, gcsafe.}
template since(version, body: untyped) {.dirty.} =
when version <= (NimMajor, NimMinor):
body