std/private/since

  Source   Edit

since is used to track when things were added to the standard library.

Templates

template since(version: (int, int); body: untyped) {.dirty.}
Evaluates body if the (NimMajor, NimMinor) is greater than or equal to version. Usage:
proc fun*() {.since: (1, 3).}
since (1, 3): fun()
  Source   Edit
template since(version: (int, int, int); body: untyped) {.dirty.}
Evaluates body if (NimMajor, NimMinor, NimPatch) is greater than or equal to version. Usage:
proc fun*() {.since: (1, 3, 1).}
since (1, 3, 1): fun()
  Source   Edit