added 'since' template for further stdlib additions

(cherry picked from commit 372b01711e)
This commit is contained in:
Andreas Rumpf
2019-11-07 12:02:26 +01:00
committed by narimiran
parent fa15083cc9
commit d6f52f3cef

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