mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +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