cae183915 ^
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import std/macros import std/macrocache const myCounter = CacheCounter"myCounter" proc getUniqueId*(): int {.compileTime.} = inc myCounter result = myCounter.value static: myCounter.inc(3) assert myCounter.value == 3