mirror of
https://github.com/status-im/nim-stew.git
synced 2025-01-09 11:45:42 +00:00
Add anonConst
This commit is contained in:
parent
6be00f7c4b
commit
d196350d22
@ -21,3 +21,6 @@ proc toArray*[T](N: static int, data: openarray[T]): array[N, T] =
|
|||||||
doAssert data.len == N
|
doAssert data.len == N
|
||||||
copyMem(addr result[0], unsafeAddr data[0], N)
|
copyMem(addr result[0], unsafeAddr data[0], N)
|
||||||
|
|
||||||
|
template anonConst*(val: untyped): untyped =
|
||||||
|
const c = val
|
||||||
|
c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user