added 'since' template for further stdlib additions
This commit is contained in:
parent
f69ee294c8
commit
372b01711e
2 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue