added typetraits.supportsCopyMem

This commit is contained in:
Andreas Rumpf
2017-10-17 21:59:17 +02:00
parent 58d5f96790
commit e7f37d7223
2 changed files with 9 additions and 1 deletions

View File

@@ -49,3 +49,6 @@ proc stripGenericParams*(t: typedesc): typedesc {.magic: "TypeTrait".}
## This trait is similar to `genericHead`, but instead of producing
## error for non-generic types, it will just return them unmodified
proc supportsCopyMem*(t: typedesc): bool {.magic: "TypeTrait".}
## This trait returns true iff the type ``t`` is safe to use for
## `copyMem`:idx:. Other languages name a type like these `blob`:idx:.