summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-17 21:59:17 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-17 21:59:17 +0200
commite7f37d7223920939cda1a206cc84efee41952437 (patch)
treec5f28ec00c2ee0ea8a2ae23851559e9a1f663abf /lib
parent58d5f9679028516b09bc2a2c0498e668f61cc8c9 (diff)
downloadNim-e7f37d7223920939cda1a206cc84efee41952437.tar.gz
added typetraits.supportsCopyMem
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/typetraits.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pure/typetraits.nim b/lib/pure/typetraits.nim
index 55c4bf038..8d738f9a7 100644
--- a/lib/pure/typetraits.nim
+++ b/lib/pure/typetraits.nim
@@ -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:.