mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 14:23:45 +00:00
added 'since' template for further stdlib additions
(cherry picked from commit 372b01711e)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user