import std/typetraits, ./shims/macros when (NimMajor, NimMinor) < (1, 4): {.push raises: [Defect].} else: {.push raises: [].} func assign*[T](tgt: var seq[T], src: openArray[T]) {.gcsafe.} func assign*[T](tgt: var openArray[T], src: openArray[T]) {.gcsafe.} func assign*[T](tgt: var T, src: T) {.gcsafe.} func assignImpl[T](tgt: var openArray[T], src: openArray[T]) = mixin assign when supportsCopyMem(T): if tgt.len > 0: moveMem(addr tgt[0], unsafeAddr src[0], sizeof(tgt[0]) * tgt.len) else: for i in 0..