diff --git a/stew/objects.nim b/stew/objects.nim index 39b3874..3307f6d 100644 --- a/stew/objects.nim +++ b/stew/objects.nim @@ -21,3 +21,6 @@ proc toArray*[T](N: static int, data: openarray[T]): array[N, T] = doAssert data.len == N copyMem(addr result[0], unsafeAddr data[0], N) +template anonConst*(val: untyped): untyped = + const c = val + c