Closed tersec closed 1 year ago
Using typetraits.supportsCopyMem
is probably the right way to solve this.
Using
typetraits.supportsCopyMem
is probably the right way to solve this.
Well, maybe supportsEqualMem
: https://github.com/nim-lang/Nim/issues/19897
That doesn't exist, though, so the intent is to at least flag obviously-incorrect usages.
Otherwise,
isZeroMemory
won't necessarily correspond to the Nim notion of being a default-initialized object of that type.