Add anonConst

This commit is contained in:
Zahary Karadjov 2019-08-02 11:51:04 +03:00
parent 6be00f7c4b
commit d196350d22
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 3 additions and 0 deletions

View File

@ -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